diff --git a/01.stress_script/inband_ac_cycle.sh b/01.stress_script/inband_ac_cycle.sh index abb6402..447012d 100644 --- a/01.stress_script/inband_ac_cycle.sh +++ b/01.stress_script/inband_ac_cycle.sh @@ -24,12 +24,12 @@ print_usage(){ echo "Format: ./inband_ac_cycle.sh [cnt] &" } -is_param_legal(){ - if [ $# -ne $PARAM_NUM ];then - print_usage - exit 0 - fi -} +# is_param_legal(){ +# if [ $# -ne $PARAM_NUM ];then +# print_usage +# exit 0 +# fi +# } pre_check(){ # check if local cnt file exist @@ -67,7 +67,10 @@ start_ac_cycle(){ # ---------------------------------------------------- # The start of script # ---------------------------------------------------- -is_param_legal +if [ $# -ne $PARAM_NUM ];then + print_usage + exit 0 +fi pre_check diff --git a/01.stress_script/inband_dc_cycle.sh b/01.stress_script/inband_dc_cycle.sh index 4038eac..c58b839 100644 --- a/01.stress_script/inband_dc_cycle.sh +++ b/01.stress_script/inband_dc_cycle.sh @@ -24,12 +24,12 @@ print_usage(){ echo "Format: ./inband_dc_cycle.sh [cnt] &" } -is_param_legal(){ - if [ $# -ne $PARAM_NUM ];then - print_usage - exit 0 - fi -} +# is_param_legal(){ +# if [ $# -ne $PARAM_NUM ];then +# print_usage +# exit 0 +# fi +# } pre_check(){ # check if local cnt file exist @@ -63,8 +63,10 @@ start_dc_cycle(){ # ---------------------------------------------------- # The start of script # ---------------------------------------------------- -is_param_legal - +if [ $# -ne $PARAM_NUM ];then + print_usage + exit 0 +fi pre_check start_dc_cycle \ No newline at end of file diff --git a/01.stress_script/inband_stress_update.sh b/01.stress_script/inband_stress_update.sh index 994d8ff..de9e95b 100644 --- a/01.stress_script/inband_stress_update.sh +++ b/01.stress_script/inband_stress_update.sh @@ -27,12 +27,12 @@ print_usage(){ echo "Format : ./inband_stress_update.sh [cnt] [image1] [image2]" } -is_param_legal(){ - if [ $# -ne $PARAM_NUM ];then - print_usage - exit 0 - fi -} +# is_param_legal(){ +# if [ $# -ne $PARAM_NUM ];then +# print_usage +# exit 0 +# fi +# } pre_check(){ # check if local cnt file exist @@ -80,6 +80,9 @@ start_stress_update(){ # ---------------------------------------------------- # The start of script # ---------------------------------------------------- -is_param_legal +if [ $# -ne $PARAM_NUM ];then + print_usage + exit 0 +fi start_stress_update \ No newline at end of file diff --git a/01.stress_script/os_reboot.sh b/01.stress_script/os_reboot.sh index b6fa65d..43bec56 100644 --- a/01.stress_script/os_reboot.sh +++ b/01.stress_script/os_reboot.sh @@ -24,12 +24,12 @@ print_usage(){ echo "Format: ./os_reboot.sh [cnt] &" } -is_param_legal(){ - if [ $# -ne $PARAM_NUM ];then - print_usage - exit 0 - fi -} +# is_param_legal(){ +# if [ $# -ne $PARAM_NUM ];then +# print_usage +# exit 0 +# fi +# } pre_check(){ # check if local cnt file exist @@ -65,7 +65,10 @@ start_os_reboot(){ # ---------------------------------------------------- # The start of script # ---------------------------------------------------- -is_param_legal +if [ $# -ne $PARAM_NUM ];then + print_usage + exit 0 +fi pre_check diff --git a/01.stress_script/outband_ac_cycle.sh b/01.stress_script/outband_ac_cycle.sh index d1d61d8..a55f058 100644 --- a/01.stress_script/outband_ac_cycle.sh +++ b/01.stress_script/outband_ac_cycle.sh @@ -26,12 +26,12 @@ print_usage(){ echo "Format: ./outband_ac_cycle.sh [cnt] [BMC ip] [user] [passwd] &" } -is_param_legal(){ - if [ $# -ne $PARAM_NUM ];then - print_usage - exit 0 - fi -} +# is_param_legal(){ +# if [ $# -ne $PARAM_NUM ];then +# print_usage +# exit 0 +# fi +# } pre_check(){ echo "---------------------------------------------" | tee $LOG_FILE @@ -67,6 +67,8 @@ start_ac_cycle(){ # ---------------------------------------------------- # The start of script # ---------------------------------------------------- -is_param_legal - +if [ $# -ne $PARAM_NUM ];then + print_usage + exit 0 +fi start_ac_cycle \ No newline at end of file diff --git a/01.stress_script/outband_dc_cycle.sh b/01.stress_script/outband_dc_cycle.sh index c40144f..a0e517d 100644 --- a/01.stress_script/outband_dc_cycle.sh +++ b/01.stress_script/outband_dc_cycle.sh @@ -26,12 +26,12 @@ print_usage(){ echo "Format: ./outband_dc_cycle.sh [cnt] [BMC ip] [user] [passwd] &" } -is_param_legal(){ - if [ $# -ne $PARAM_NUM ];then - print_usage - exit 0 - fi -} +# is_param_legal(){ +# if [ $# -ne $PARAM_NUM ];then +# print_usage +# exit 0 +# fi +# } pre_check(){ echo "---------------------------------------------" | tee $LOG_FILE @@ -65,6 +65,9 @@ start_dc_cycle(){ # ---------------------------------------------------- # The start of script # ---------------------------------------------------- -is_param_legal +if [ $# -ne $PARAM_NUM ];then + print_usage + exit 0 +fi start_dc_cycle \ No newline at end of file