mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 05:12:30 +00:00 
			
		
		
		
	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
This commit is contained in:
		@@ -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
 | 
			
		||||
#######################################
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user