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 #######################################