at the test just now, "testbox: dc-8g" is need.
Signed-off-by: Zhang Dewan 513619464@qq.com --- tests/reset-tbox | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/tests/reset-tbox b/tests/reset-tbox index 1ca17bfd..36aa37d5 100755 --- a/tests/reset-tbox +++ b/tests/reset-tbox @@ -1,11 +1,11 @@ #!/bin/bash -# host_nameset +# - host_nameset
account_file=/etc/lab/.account.info hosts_file=/etc/lab/hosts_file command_file=/usr/bin/ipmitool
-FileCheck() +file_check() { for i in $account_file $hosts_file $command_file do @@ -17,7 +17,7 @@ FileCheck() source $account_file }
-TboxCheck() +tbox_check() { ibmc_ip=$(grep -w $host_name $hosts_file | awk '{print $1}')
@@ -27,13 +27,13 @@ TboxCheck() } }
-ResetTbox() +reset_tbox() { echo "reboot the tesetbox..." ipmitool -I lanplus -H $ibmc_ip -U $iBMC_user -P $iBMC_passwd power reset }
-ResultCheck() +result_check() { if [ $? -ne 0 ] ; then echo "Failed to reboot the testbox: $host_name" @@ -43,10 +43,10 @@ ResultCheck()
main() { - FileCheck - TboxCheck - ResetTbox - ResultCheck + file_check + tbox_check + reset_tbox + result_check } main