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
This commit is contained in:
lissav 2009-03-02 16:04:09 +00:00
parent 31fd3fa0ba
commit ebe2e233ef

View File

@ -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();