aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/host_baremetal.sh
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-09-08 07:47:19 -0400
committerbaigk <baiguoku@huawei.com>2015-09-08 08:24:09 -0400
commitcf87d3067a63cb8be315a3addfd9c27d86be3b5a (patch)
tree861d46aebc75c73cc13a19fecfb5c48aa88a56a1 /deploy/host_baremetal.sh
parent633175ed2c5d0ab339027ba0a542bcdd4d3769c0 (diff)
Build improvement for speedup and using public repo
JIRA: COMPASS-19 Change-Id: Iba101807e1bd2f843f1253791b7e87e1acb7934b Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'deploy/host_baremetal.sh')
-rw-r--r--deploy/host_baremetal.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/deploy/host_baremetal.sh b/deploy/host_baremetal.sh
index a543528..9e25c98 100644
--- a/deploy/host_baremetal.sh
+++ b/deploy/host_baremetal.sh
@@ -1,14 +1,15 @@
function reboot_hosts() {
- cmd='for i in {14..18}; do /dev/shm/smm/usr/bin/smmset -l blade$i -d bootoption -v 1 0; echo Y | /dev/shm/smm/usr/bin/smmset -l blade$i -d frucontrol -v 0; done'
- /usr/bin/expect ${COMPASS_DIR}/deploy/remote_excute.exp ${SWITCH_IPS} 'root' 'Admin@7*24' "$cmd"
+ if [ -z $POWER_MANAGE ]; then
+ return
+ fi
+ $POWER_MANAGE
}
function get_host_macs() {
local config_file=$WORK_DIR/installer/compass-install/install/group_vars/all
- local machines=`echo $HOST_MACS|sed 's/ /,/g'`
-
echo "test: true" >> $config_file
- echo "pxe_boot_macs: [${machines}]" >> $config_file
+ machine=`echo $HOST_MACS | sed -e 's/,/'\',\''/g' -e 's/^/'\''/g' -e 's/$/'\''/g'`
+ echo "pxe_boot_macs: [$machine]" >> $config_file
- echo $machines
+ echo $machine
}