From ebe2e233ef29efc472be295b690340e52086cc8c Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 2 Mar 2009 16:04:09 +0000 Subject: [PATCH] add reload option to xcatstart git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2820 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/stopstartxcatd | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/xCAT-server/sbin/stopstartxcatd b/xCAT-server/sbin/stopstartxcatd index 559d082d8..14c285db4 100755 --- a/xCAT-server/sbin/stopstartxcatd +++ b/xCAT-server/sbin/stopstartxcatd @@ -37,7 +37,7 @@ my $rc = 0; my $cmd = basename($0); if (!(xCAT::Utils->isAIX())) { # only runs on AIX - xCAT::MsgUtils->message("E", "This command should only be run on AIX.\nRun service xcatd [start|stop|restart] on Linux.\n "); + xCAT::MsgUtils->message("E", "This command should only be run on AIX.\n"); exit 1; } @@ -66,21 +66,36 @@ sub parse_args if ( !GetOptions( 'h|help' => \$::HELP, + 'r|reload' => \$::RELOAD, 'v|version' => \$::VERSION ) ) - { - $usagemsg = "$cmd [-h|-v]\n"; - xCAT::MsgUtils->message("E", $usagemsg); + { + if ($cmd eq "xcatstart") { + $usagemsg = "$cmd [-h|-v|-r]\n"; + xCAT::MsgUtils->message("E", $usagemsg); + } else { #xcatstop + $usagemsg = "$cmd [-h|-v]\n"; + xCAT::MsgUtils->message("E", $usagemsg); + } exit 1; } if ($::HELP) { - $usagemsg = "$cmd [-h|-v]\n"; - xCAT::MsgUtils->message("I", $usagemsg); + if ($cmd eq "xcatstart") { + $usagemsg = "$cmd [-h|-v|-r]\n"; + xCAT::MsgUtils->message("I", $usagemsg); + } else { #xcatstop + $usagemsg = "$cmd [-h|-v]\n"; + xCAT::MsgUtils->message("I", $usagemsg); + } exit 0; } + if ($::RELOAD) + { + $ENV{XCATRELOAD} = "yes"; + } if ($::VERSION) { my $version = xCAT::Utils->Version();