summaryrefslogtreecommitdiffstats
path: root/ci/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'ci/deploy')
-rwxr-xr-xci/deploy/deploy.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/ci/deploy/deploy.sh b/ci/deploy/deploy.sh
index b617a174..bfad429d 100755
--- a/ci/deploy/deploy.sh
+++ b/ci/deploy/deploy.sh
@@ -207,6 +207,7 @@ function update_dha_by_pdf()
rm $tmpfile
return
fi
+ test -d $(dirname ${DHA_CONF}) || mkdir -p $(dirname ${DHA_CONF})
cp ${tmpfile} ${DHA_CONF}
echo "====== Update deploy.yml from POD Descriptor File ======"
@@ -215,6 +216,7 @@ function update_dha_by_pdf()
echo "Cannot generate network configuration from PDF and IDF!"
return
fi
+ test -d $(dirname ${NETWORK_CONF}) || mkdir -p $(dirname ${NETWORK_CONF})
cp ${tmpfile} ${NETWORK_CONF}
echo "====== Update $(basename ${NETWORK_CONF}) from POD Descriptor File ======"
rm -f $tmpfile
@@ -483,20 +485,20 @@ function get_mac_addresses_for_virtual()
name=${VM_MULTINODE[$i]}
macs=$(virsh dumpxml $name | grep "<mac" | awk -F "'" '{print $2}' | tr "\n" " ")
line=$(awk "BEGIN{}(/name/&&/$name/){print NR}" $tmpfile)
- sed -i "${line}a\ mac_addresses:" $tmpfile
+ sed -i "${line}a\ mac_addresses:" $tmpfile
for mac in $macs; do
line=$[ line + 1 ]
- sed -i "${line}a\ - \'$mac\'" $tmpfile
+ sed -i "${line}a\ - \'$mac\'" $tmpfile
done
done
else
name="all_in_one"
macs=$(virsh dumpxml $name | grep "<mac" | awk -F "'" '{print $2}' | tr "\n" " ")
line=$(awk "BEGIN{}(/name/&&/$name/){print NR}" $tmpfile)
- sed -i "${line}a\ mac_addresses:" $tmpfile
+ sed -i "${line}a\ mac_addresses:" $tmpfile
for mac in $macs; do
line=$[ line + 1 ]
- sed -i "${line}a\ - \'$mac\'" $tmpfile
+ sed -i "${line}a\ - \'$mac\'" $tmpfile
done
fi