-Fix problem where packimage would not ensure only one variant of a profile packed

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1339 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-05-09 17:25:25 +00:00
parent bc96f570ba
commit ef51eac418

View File

@ -114,14 +114,15 @@ sub process_request {
$callback->({error=>["$installroot/netboot/$osver/$arch/$profile/rootimg does not exist, run genimage -o $osver -p $profile on a server with matching architecture"]});
return;
}
unlink("$installroot/netboot/$osver/$arch/$profile/rootimg.gz");
unlink("$installroot/netboot/$osver/$arch/$profile/rootimg.sfs");
unlink("$installroot/netboot/$osver/$arch/$profile/rootimg.nfs");
if ($method =~ /cpio/) {
$excludestr =~ s!-a \z!|cpio -H newc -o | gzip -c - > ../rootimg.gz!;
unlink("$installroot/netboot/$osver/$arch/$profile/rootimg.gz");
$oldmask = umask 0077;
} elsif ($method =~ /squashfs/) {
$temppath = mkdtemp("/tmp/packimage.$$.XXXXXXXX");
$excludestr =~ s!-a \z!|cpio -dump $temppath!;
unlink("$installroot/netboot/$osver/$arch/$profile/rootimg.sfs");
} elsif ($method =~ /nfs/) {
$excludestr = "touch ../rootimg.nfs";
} else {