summaryrefslogtreecommitdiffstats
path: root/lib/container/move
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2017-10-06 15:05:42 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2018-05-27 05:59:31 +0000
commit1e03e6dc46624f658239c3179875bd28b67fa91a (patch)
tree38731aa38565f40cb5419ea8e17af1af84f1f186 /lib/container/move
parentReleasing version 20180503. (diff)
downloadcompute-tools-1e03e6dc46624f658239c3179875bd28b67fa91a.tar.xz
compute-tools-1e03e6dc46624f658239c3179875bd28b67fa91a.zip
Switching to systemd-nspawn configuration files from /etc/container-tools/config.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
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 e533b0e..d9f60e1 100755
--- a/lib/container/move
+++ b/lib/container/move
@@ -22,7 +22,7 @@ set -e
COMMAND="$(basename ${0})"
-CONFIG="/etc/container-tools/config"
+CONFIG="/etc/systemd/nspawn"
HOOKS="/etc/container-tools/hooks"
MACHINES="/var/lib/machines"
@@ -140,11 +140,11 @@ do
done
# Run
-mv "${CONFIG}/${OLD}.conf" "${CONFIG}/${NEW}.conf"
+mv "${CONFIG}/${OLD}.nspawn" "${CONFIG}/${NEW}.nspawn"
mv "${MACHINES}/${OLD}" "${MACHINES}/${NEW}"
# rw bind mounts
-BIND="$(awk -F= '/^bind=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+BIND="$(awk -F= '/^bind=/ { print $2 }' ${CONFIG}/${NAME}.nspawn)"
if [ -n "${BIND}" ]
then
@@ -171,7 +171,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}/${NAME}.nspawn)"
if [ -n "${BIND_RO}" ]
then
@@ -198,7 +198,7 @@ then
fi
# config
-sed -i -e "s|${OLD}|${NEW}|g" "${CONFIG}/${NEW}.conf"
+sed -i -e "s|${OLD}|${NEW}|g" "${CONFIG}/${NEW}.nspawn"
# Post hooks
for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"