From 45a76a81152c2915ffc46daf335cbfc0e8c1b752 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 12 May 2008 19:41:17 +0000 Subject: [PATCH] -Fix problem where packimage no longer usefully warns on lack of genimage produced tree git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1355 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/packimage.pm | 6 +++++- 1 file changed, 5 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 f42effe17..5ce102c59 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/packimage.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/packimage.pm @@ -83,6 +83,10 @@ sub process_request { close($exlist); # add the xCAT post scripts to the image + if (! -d "$installroot/netboot/$osver/$arch/$profile/rootimg") { + $callback->({error=>["$installroot/netboot/$osver/$arch/$profile/rootimg does not exist, run genimage -o $osver -p $profile on a server with matching architecture"]}); + return; + } copybootscript($installroot, $osver, $arch, $profile, $callback); my $passtab = xCAT::Table->new('passwd'); if ($passtab) { @@ -104,7 +108,6 @@ sub process_request { if ($method =~ /nfs/) { $verb = "Prepping"; } - $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."]}); } @@ -114,6 +117,7 @@ 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; } + $callback->({data=>["$verb contents of $installroot/netboot/$osver/$arch/$profile/rootimg"]}); unlink("$installroot/netboot/$osver/$arch/$profile/rootimg.gz"); unlink("$installroot/netboot/$osver/$arch/$profile/rootimg.sfs"); unlink("$installroot/netboot/$osver/$arch/$profile/rootimg.nfs");