From e581247ade10588bf33150c591c92bad059ac8f7 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 12 Mar 2015 15:09:40 -0400 Subject: [PATCH] When building xCAT-server rpm, a Unknow option: help message appears. This is caused by the xCATreg tool not implementing the --help option (was -h or ? for help) build-readme requires the tools to implement the help option --- xCAT-server/share/xcat/tools/xCATreg | 38 ++++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/xCAT-server/share/xcat/tools/xCATreg b/xCAT-server/share/xcat/tools/xCATreg index f9284e78b..78a8d1589 100644 --- a/xCAT-server/share/xcat/tools/xCATreg +++ b/xCAT-server/share/xcat/tools/xCATreg @@ -165,7 +165,7 @@ sub xCATreg_init{ #init important attributes - $date = `date +"%Y%m%d"`; + $date = `date +"%Y%m%d"`; chomp($date); &runcmd("mkdir -p $logfiledir") if(! -e $logfiledir); @@ -1031,29 +1031,13 @@ sub git_update{ return 0; } -xCATreg_init(); - -############################################################### -# Mainfunction -############################################################### -send_msg(2,"........................"); -send_msg(2,"........................"); -send_msg(2,".....ooooO.............."); -send_msg(2,"....(....)....Ooooo....."); -send_msg(2,".....\\..(.....(....)...."); -send_msg(2,"......\\__).....)../....."); -send_msg(2,"..............(_ /......"); -send_msg(2,"........................"); -send_msg(2,".........START ........."); -send_msg(2,"........................"); - ####################################### # step 0. Parse input arguments ####################################### send_msg(2, "step 1, Parse input arguments............"); =pod if ( - !GetOptions("h|?" => \$needhelp, + !GetOptions("--help|h|?" => \$needhelp, "f=s" => \$configfile, "b=s" => \$branch, "m=s" => \$management_node, @@ -1063,7 +1047,7 @@ if ( ) =cut if ( - !GetOptions("h|?" => \$needhelp, + !GetOptions("--help|h|?" => \$needhelp, "f=s" => \$configfile, "b=s" => \$branch, "m=s" => \$management_node, @@ -1081,6 +1065,22 @@ if ($needhelp) exit 0; } + +xCATreg_init(); + +############################################################### +# Mainfunction +############################################################### +send_msg(2,"........................"); +send_msg(2,"........................"); +send_msg(2,".....ooooO.............."); +send_msg(2,"....(....)....Ooooo....."); +send_msg(2,".....\\..(.....(....)...."); +send_msg(2,"......\\__).....)../....."); +send_msg(2,"..............(_ /......"); +send_msg(2,"........................"); +send_msg(2,".........START ........."); +send_msg(2,"........................"); ####################################### # step 1. Read configuration files #######################################