From 749d0f2be159976c01261e62406e2923c1e94465 Mon Sep 17 00:00:00 2001 From: ligc Date: Mon, 24 Aug 2009 02:48:50 +0000 Subject: [PATCH] mk_spot: create spot from existing mksysb image git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4028 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/aixinstall.pm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index a11cbbd1d..b332051ea 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -1727,7 +1727,13 @@ sub mk_spot my $cmd = "/usr/sbin/nim -o define -t spot -a server=master "; # source of images - $cmd .= "-a source=$lppsrcname "; + if ($::METHOD eq "mksysb") { + # Create spot from mksysb image + my $mksysbname = $::image_name . "_mksysb"; + $cmd .= "-a source=$mksysbname "; + } else { + $cmd .= "-a source=$lppsrcname "; + } # where to put it - the default is /install my $loc; @@ -1785,12 +1791,22 @@ sub mk_spot push @{$rsp->{data}}, "Creating a NIM SPOT resource. This could take a while.\n"; xCAT::MsgUtils->message("I", $rsp, $callback); + if ($::VERBOSE) { + my $rsp; + push @{$rsp->{data}}, "Running: \'$cmd\'\n"; + xCAT::MsgUtils->message("I", $rsp, $callback); + } my $output = xCAT::Utils->runcmd("$cmd", -1); if ($::RUNCMD_RC != 0) { my $rsp; push @{$rsp->{data}}, "Could not create a NIM definition for \'$spot_name\'.\n"; xCAT::MsgUtils->message("E", $rsp, $callback); + if ($::VERBOSE) { + my $rsp; + push @{$rsp->{data}}, "Error message is: \'$output\'\n"; + xCAT::MsgUtils->message("I", $rsp, $callback); + } return undef; } } # end - if spot doesn't exist