From 927d8023810abfc9c49274614a4ef32e8c72b878 Mon Sep 17 00:00:00 2001 From: nott Date: Fri, 9 Jan 2009 20:41:14 +0000 Subject: [PATCH] Add a check for the NIM client fileset and fix an error message. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2588 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/aixinstall.pm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index e733df0c7..6810b2f26 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -918,7 +918,7 @@ sub mknimimage # display the usage if -h or --help is specified if ($::HELP) { &mknimimage_usage($callback); - return 2; + return 0; } # display the version statement if -v or --verison is specified @@ -982,6 +982,17 @@ sub mknimimage # # Install/config NIM master if needed # + # check for client file set + my $lsnimcmd = "/usr/bin/lslpp -l bos.sysmgt.nim.client >/dev/null 2>&1"; + my $out = xCAT::Utils->runcmd("$lsnimcmd", -1); + if ($::RUNCMD_RC != 0) { + my $rsp; + push @{$rsp->{data}}, "Could not install and configure NIM.\n"; + push @{$rsp->{data}}, "The bos.sysmgt.nim.client file set is a prerequisite for the NIM master. Please install this software and retry the command.\n"; + xCAT::MsgUtils->message("E", $rsp, $callback); + return 1; + } + # check for master file set my $lsnimcmd = "/usr/bin/lslpp -l bos.sysmgt.nim.master >/dev/null 2>&1"; my $out = xCAT::Utils->runcmd("$lsnimcmd", -1); @@ -992,7 +1003,7 @@ sub mknimimage my $nimout = xCAT::Utils->runcmd("$nimcmd", -1); if ($::RUNCMD_RC != 0) { my $rsp; - push @{$rsp->{data}}, "Could install and configure NIM.\n"; + push @{$rsp->{data}}, "Could not install and configure NIM.\n"; if ($::VERBOSE) { push @{$rsp->{data}}, "$nimout"; }