added help back to mktoolscenter
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16165 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
1023dbc6f7
commit
f8261cf6ad
@ -33,6 +33,7 @@ my %Options = ('interactive',"yes",'warnings','','log',"yes",'dump',"yes");
|
||||
my @warnings;
|
||||
my $logfile = DEFAULT_LOG_FILE;
|
||||
my $now = localtime;
|
||||
my $help;
|
||||
|
||||
#
|
||||
# print a warning and wait a bit if warnings are enabled
|
||||
@ -136,6 +137,23 @@ sub question {
|
||||
return $reply;
|
||||
}
|
||||
|
||||
sub usage {
|
||||
print "Usage: mktoolscenter\n";
|
||||
print " --ph <proxyhost>\n";
|
||||
print " --pp <proxyport>\n";
|
||||
print " --puser <proxyuser>\n";
|
||||
print " --ppw <proxypassword>\n";
|
||||
print " -l <logfile>\n";
|
||||
print " -s\n";
|
||||
print " --nfsserver <NFS server address>\n";
|
||||
print " --nfspath <NFS server path>\n";
|
||||
print " --profilename <profile name>\n";
|
||||
print " --help\n\n";
|
||||
print "Updates IBM system x server hardware using IBM Bootable Media Creator.\n\n";
|
||||
print "Author: Jim Turner\n";
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Begin main
|
||||
#
|
||||
@ -147,21 +165,14 @@ unless (GetOptions("s"=>\$surrogate, "l=s"=>\$logfile,
|
||||
"ph=s"=>\$proxy{host}, "pp=i"=>\$proxy{port},
|
||||
"puser=s"=>\$proxy{user}, "ppw=s"=>\$proxy{pw},
|
||||
"nfsserver=s"=>\$nfsserver,"nfspath=s"=>\$nfspath,
|
||||
"profilename=s"=>\$profilename,
|
||||
"profilename=s"=>\$profilename, "help"=>\$help,
|
||||
)) {
|
||||
printf "Usage:\n";
|
||||
printf "--ph <proxyhost>\n";
|
||||
printf "--pp <proxyport>\n";
|
||||
printf "--puser <proxyuser>\n";
|
||||
printf "--ppw <proxypassword>\n";
|
||||
printf "-l <logfile>\n";
|
||||
printf "-s\n";
|
||||
printf "--nfsserver <NFS server address>\n";
|
||||
printf "--nfspath <NFS server path>\n";
|
||||
printf "--profilename <profile name>\n";
|
||||
usage();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ($help) { usage(); exit 0; }
|
||||
|
||||
if (@ARGV > 0) {
|
||||
open(IN,"<",@ARGV[0]) || die "Cannot open input file @ARGV[0]";
|
||||
$Options{interactive} = '';
|
||||
|
Loading…
Reference in New Issue
Block a user