Added -m nfs support for new hybrid mode.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1178 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
datajerk 2008-04-24 12:47:21 +00:00
parent 298b72f251
commit 5fe19c387b

View File

@ -84,13 +84,22 @@ sub process_request {
# add the xCAT post scripts to the image
copybootscript($installroot, $osver, $arch, $profile, $callback);
$callback->({data=>["Packing contents of $installroot/netboot/$osver/$arch/$profile/rootimg"]});
my $verb = "Packing";
if ($method =~ /nfs/) {
$verb = "Preping";
}
$callback->({data=>["$verb contents of $installroot/netboot/$osver/$arch/$profile/rootimg"]});
if ($method =~ /nfs/) {
$callback->({data=>["\nNOTE: Contents of $installroot/netboot/$osver/$arch/$profile/rootimg\nMUST be available on all service and management nodes and NFS exported."]});
}
my $temppath;
if ($method =~ /cpio/) {
$excludestr =~ s!-a \z!|cpio -H newc -o | gzip -c - > ../rootimg.gz!;
} elsif ($method =~ /squashfs/) {
$temppath = mkdtemp("/tmp/packimage.$$.XXXXXXXX");
$excludestr =~ s!-a \z!|cpio -dump $temppath!;
} elsif ($method =~ /nfs/) {
$excludestr = "touch ../rootimg.nfs";
} else {
$callback->({error=>["Invalid method '$method' requested"],errorcode=>[1]});
}