fix version and error messages

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4300 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2009-10-06 12:22:42 +00:00
parent bbca8b2b29
commit 470a0f957f
2 changed files with 11 additions and 8 deletions

View File

@ -77,25 +77,26 @@ sub parse_args
)
{
$usagemsg =
" dumpxCATdb -h \n dumpxCATdb [-p] [path to dump directory]\n";
" dumpxCATdb -h \n dumpxCATdb -v \n dumpxCATdb [-p] [path to dump directory]\n";
xCAT::MsgUtils->message("E", $usagemsg);
exit 1;
}
if ($::HELP)
{
$usagemsg =
" dumpxCATdb -h \n dumpxCATdb [-p] [path to dump directory]\n";
" dumpxCATdb -h \n dumpxCATdb -v \n dumpxCATdb [-p] [path to dump directory]\n";
xCAT::MsgUtils->message("I", $usagemsg);
exit 0;
}
if ($::VERSION)
{
xCAT::MsgUtils->message("I", "Version 2.0\n");
my $version = xCAT::Utils->Version();
xCAT::MsgUtils->message("N", $version);
exit 0;
}
if (!($::PATH))
{
my $msg = " -p with path to directory to hold db files.\n";
my $msg = " Requires -p with path to directory to hold db files.\n";
xCAT::MsgUtils->message("E", $msg);
exit 1;
}

View File

@ -86,25 +86,27 @@ sub parse_args
)
{
$usagemsg =
" restorexCATdb -h \n restorexCATdb [-p] [path to restore .csv files]\n";
" restorexCATdb -h \n restorexCATdb -v \n restorexCATdb [-p] [path to restore .csv files]\n";
xCAT::MsgUtils->message("E", $usagemsg);
exit 1;
}
if ($::HELP)
{
$usagemsg =
" restorexCATdb -h \n restorexCATdb [-p] [path to restore .csv files]\n";
" restorexCATdb -h \n restorexCATdb -v \n restorexCATdb [-p] [path to restore .csv files]\n";
xCAT::MsgUtils->message("I", $usagemsg);
exit 0;
}
if ($::VERSION)
{
xCAT::MsgUtils->message("I", "Version 2.0\n");
my $version = xCAT::Utils->Version();
xCAT::MsgUtils->message("N", $version);
exit 0;
}
if (!($::PATH))
{
my $msg = " -p with path to place dump files is required \n";
my $msg = " -p with path to database files is required \n";
xCAT::MsgUtils->message("E", $msg);
exit 1;
}