diff options
author | Justin chi <chigang@huawei.com> | 2016-10-16 04:27:54 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-10-16 04:27:54 +0000 |
commit | 38a7d02dae6715520071edbd635e0d2085263399 (patch) | |
tree | 1b6d41907af4577dfb6073a0c727fa1af704eee6 /deploy/template/power | |
parent | 78d1f808704a287cd2efb697c6af445280733c7f (diff) | |
parent | faed52cdedf1b067c3f39d49827cb843d55edd45 (diff) |
Merge "Add recovery scripts"
Diffstat (limited to 'deploy/template/power')
-rw-r--r-- | deploy/template/power/ipmitool.tmpl | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/deploy/template/power/ipmitool.tmpl b/deploy/template/power/ipmitool.tmpl index a297e001..048e997a 100644 --- a/deploy/template/power/ipmitool.tmpl +++ b/deploy/template/power/ipmitool.tmpl @@ -40,19 +40,23 @@ for i in {1..5}; do 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 - break - elif [[ i -lt 5 ]] - then - sleep 1 - else - log_error "set $ipmiIp pxe fail" - exit 1 - fi -done -sleep 1 + +if [[ "\$DEPLOY_RECOVERY" != "true" ]]; then + for i in {1..5}; do + if ipmitool -I $interface -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis bootdev pxe >/dev/null 2>&1 + then + break + elif [[ i -lt 5 ]] + then + sleep 1 + else + log_error "set $ipmiIp pxe fail" + exit 1 + fi + done + sleep 1 +fi + for i in {1..5}; do if ipmitool -I $interface -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis power reset >/dev/null 2>&1 then |