fix bug: #4512 nodeset will throw error if osimage pkgdir contains multi-value in ubuntu

This commit is contained in:
Leo.C.Wu 2015-01-09 11:19:52 +08:00
parent 09045aca5e
commit b55d6bf3b7
2 changed files with 13 additions and 0 deletions

View File

@ -711,6 +711,12 @@ sub mkinstall
my $initrdpath;
my $maxmem;
# only first value is adopted, please see tabdump linuximage, section pkgdir.
my @pkgdirs = split(/,/, $pkgdir);
if (scalar(@pkgdirs) > 1) {
$pkgdir = @pkgdirs[0];
}
if (
(
($arch =~ /x86/ and

View File

@ -170,6 +170,13 @@ sub process_request {
$pkglist = $ref_linuximage_tab->{'pkglist'};
$srcdir = $ref_linuximage_tab->{'pkgdir'};
my @pkgarray = split(/,/, $ref_linuximage_tab->{'pkgdir'});
if(scalar(@pkgarray) > 1)
{
$srcdir = @pkgarray[0];
}
$srcdir_otherpkgs = $ref_linuximage_tab->{'otherpkgdir'};
$otherpkglist = $ref_linuximage_tab->{'otherpkglist'};
$postinstall_filename = $ref_linuximage_tab->{'postinstall'};