summaryrefslogtreecommitdiffstats
path: root/lib/container/move
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-10-30 04:13:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2020-10-30 04:13:05 +0000
commitd1c2a7be1249a4fe1e411a8140ce646f97906859 (patch)
tree1911ababde72f2b89a8fb559d3c1def046525926 /lib/container/move
parentAdding upstream version 20200830. (diff)
downloadopen-infrastructure-compute-tools-d1c2a7be1249a4fe1e411a8140ce646f97906859.tar.xz
open-infrastructure-compute-tools-d1c2a7be1249a4fe1e411a8140ce646f97906859.zip
Adding upstream version 20201030.upstream/20201030
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/container/move')
-rwxr-xr-xlib/container/move10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/container/move b/lib/container/move
index 377bd7c..f87e5a8 100755
--- a/lib/container/move
+++ b/lib/container/move
@@ -98,7 +98,7 @@ then
exit 1
fi
-STATE="$(machinectl show ${OLD} 2>&1 | awk -F= '/^State=/ { print $2 }')"
+STATE="$(machinectl show ${OLD} 2>&1 | awk -FState= '/^State=/ { print $2 }')"
case "${STATE}" in
running)
@@ -132,7 +132,7 @@ case "${FORCE}" in
esac
# Pre hooks
-for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
+for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${OLD}.pre-${COMMAND}"
do
if [ -x "${FILE}" ]
then
@@ -145,7 +145,7 @@ mv "${CONFIG}/${OLD}.conf" "${CONFIG}/${NEW}.conf"
mv "${MACHINES}/${OLD}" "${MACHINES}/${NEW}"
# rw bind mounts
-BIND="$(awk -F= '/^bind=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+BIND="$(awk -Fbind= '/^bind=/ { print $2 }' ${CONFIG}/${NEW}.conf)"
if [ -n "${BIND}" ]
then
@@ -172,7 +172,7 @@ then
fi
# ro bind mounts
-BIND_RO="$(awk -F= '/^bind-ro=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+BIND_RO="$(awk -Fbind-ro= '/^bind-ro=/ { print $2 }' ${CONFIG}/${NEW}.conf)"
if [ -n "${BIND_RO}" ]
then
@@ -202,7 +202,7 @@ fi
sed -i -e "s|${OLD}|${NEW}|g" "${CONFIG}/${NEW}.conf"
# Post hooks
-for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
+for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NEW}.post-${COMMAND}"
do
if [ -x "${FILE}" ]
then