summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2015-12-08 10:12:05 -0500
committerDan Radez <dradez@redhat.com>2015-12-08 12:29:42 -0500
commitc59d834f3d2f57942f2b8d3bf86d71e53401d24f (patch)
tree1c6c04a4ec3069e2af8cd98e37025d736ffc4a1c /ci
parent1504fa90460378597344e91120489225011d5966 (diff)
syntax fixes for if statements
Change-Id: I3ff4b0e9aecff8fc193017d0dc4cd3c4c1a6339c Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'ci')
-rwxr-xr-xci/deploy.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 2483b84e..db802d2e 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -149,7 +149,7 @@ parse_inventory_file() {
inventory_list=$(echo $inventory_list | sed 's/ $//')
for node in $inventory_list; do
- ((node_count++))
+ ((node_count+=1))
done
node_total=$node_count
@@ -171,8 +171,8 @@ parse_inventory_file() {
"
node_count=0
for node in $inventory_list; do
- ((node_count++))
- node_output[$node]="
+ ((node_count+=1))
+ node_output="
{
\"pm_password\": \"$(eval echo \${${node}ipmi_pass})\",
\"pm_type\": \"pxe_ipmitool\",
@@ -186,7 +186,7 @@ parse_inventory_file() {
\"pm_user\": \"$(eval echo \${${node}ipmi_user})\",
\"pm_addr\": \"$(eval echo \${${node}ipmi_ip})\"
"
- instack_env_output+=${node_output[$node]}
+ instack_env_output+=${node_output}
if [ $node_count -lt $node_total ]; then
instack_env_output+=" },"
else
@@ -200,7 +200,7 @@ parse_inventory_file() {
'
#Copy instackenv.json to undercloud for baremetal
echo -e "{blue}Parsed instackenv JSON:\n${instack_env_output}${reset}"
- ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" <<EOI
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
cat > instackenv.json << EOF
$instack_env_output
EOF
@@ -286,7 +286,7 @@ Are you sure you have enabled vmx in your bios or hypervisor?${reset}"
}
##verify vm exists, an has a dhcp lease assigned to it
-##params: none
+##params: none
function setup_instack_vm {
if ! virsh list --all | grep instack > /dev/null; then
#virsh vol-create default instack.qcow2.xml
@@ -334,8 +334,8 @@ function setup_instack_vm {
# get the instack VM IP
UNDERCLOUD=$(grep instack /var/lib/libvirt/dnsmasq/default.leases | awk '{print $3}' | head -n 1)
- if -n $UNDERCLOUD; then
- echo "Never got IP for Instack. Can Not Continue."
+ if [ -z "$UNDERCLOUD" ]; then
+ echo "\n\nNever got IP for Instack. Can Not Continue."
exit 1
else
echo -e "${blue}\rInstack VM has IP $UNDERCLOUD${reset}"
@@ -348,7 +348,7 @@ function setup_instack_vm {
sleep 3
CNT=$CNT-1
done
- if $CNT == 0; then
+ if [ "$CNT" -eq 0 ]; then
echo "Failed to contact Instack. Can Not Continue"
exit 1
fi
@@ -358,7 +358,7 @@ function setup_instack_vm {
sleep 3
CNT=$CNT-1
done
- if $CNT == 0; then
+ if [ "$CNT" -eq 0 ]; then
echo "Failed to connect to Instack. Can Not Continue"
exit 1
fi