From 5fe19c387b714cd1ab5c2c7ef270eb46aac52a00 Mon Sep 17 00:00:00 2001 From: datajerk Date: Thu, 24 Apr 2008 12:47:21 +0000 Subject: [PATCH] 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 --- xCAT-server-2.0/lib/xcat/plugins/packimage.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/packimage.pm b/xCAT-server-2.0/lib/xcat/plugins/packimage.pm index e1235af2a..71694aa65 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/packimage.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/packimage.pm @@ -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]}); }