From 6028765b0e1f1b34924013e758cac46b258bcf4b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 22 Sep 2020 22:37:37 +0200 Subject: Correcting wrong usages of new and old container names in container move command, thanks to Katharina Drexel for discovering it. Signed-off-by: Daniel Baumann --- lib/container/move | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/container/move b/lib/container/move index 377bd7c..a31749e 100755 --- a/lib/container/move +++ b/lib/container/move @@ -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 -F= '/^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 -F= '/^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 -- cgit v1.2.3