aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/template
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/template')
-rw-r--r--deploy/template/power/ipmitool.tmpl14
1 files changed, 13 insertions, 1 deletions
diff --git a/deploy/template/power/ipmitool.tmpl b/deploy/template/power/ipmitool.tmpl
index 73278e45..a297e001 100644
--- a/deploy/template/power/ipmitool.tmpl
+++ b/deploy/template/power/ipmitool.tmpl
@@ -27,7 +27,19 @@ exit 1
#else
#set interface='lan'
#end if
-
+for i in {1..5}; do
+ if ipmitool -I $interface -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis power on >/dev/null 2>&1
+ then
+ break
+ elif [[ i -lt 5 ]]
+ then
+ sleep 1
+ else
+ log_error "$ipmiIp power on fail"
+ exit 1
+ fi
+done
+sleep 1
for i in {1..5}; do
if ipmitool -I $interface -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis bootdev pxe >/dev/null 2>&1
then