diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index b4c350292..2298b324b 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -373,8 +373,9 @@ unless ($onlyinitrd) { foreach $pass (sort {$a <=> $b} (keys(%extra_hash))) { foreach (keys(%{$extra_hash{$pass}})) { if($_ eq "INCLUDEBAD") { - print "Unable to open the following pkglist files:\n".join("\n",@{$extra_hash{$pass}{INCLUDEBAD}}); - exit 1; + #print "Unable to open the following pkglist files:\n".join("\n",@{$extra_hash{$pass}{INCLUDEBAD}}); + xdie "Unable to open the following pkglist files:\n".join("\n",@{$extra_hash{$pass}{INCLUDEBAD}}); + # exit 1; } if (($_ eq "PRE_REMOVE") || ($_ eq "POST_REMOVE") || ($_ eq "ENVLIST")) { next;} @@ -423,8 +424,9 @@ unless ($onlyinitrd) { print "$envlist $aptgetcmd\n"; my $rc = system("$envlist $aptgetcmd"); if ($rc) { - print "apt-get invocation failed\n"; - exit 1; + #print "apt-get invocation failed\n"; + #exit 1; + xdie "apt-get invocation failed\n"; } } else { print "No Packages marked for install\n"; @@ -1749,7 +1751,11 @@ sub mount_chroot { #system("mount -o bind /sys $rootimage_dir/sys"); system("mount -o bind $pkgdir $rootimage_dir/mnt/pkgdir"); if ($otherpkgdir){ - system("mount -o bind $otherpkgdir $rootimage_dir/mnt/otherpkgdir"); + if(-d $otherpkgdir){ + system("mount -o bind $otherpkgdir $rootimage_dir/mnt/otherpkgdir"); + }else{ + print "The specified otherpkgdir $otherpkgdir does not exist!\n" + } } }