From b71a3b319fa347157973e45e4e08f407e2cb5d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sp=C3=B6hel?= Date: Sun, 9 Jul 2017 15:52:29 +0200 Subject: Making container-tools use nspawn files. --- lib/container/stop | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/container/stop') diff --git a/lib/container/stop b/lib/container/stop index 12cf7fa..0e3b635 100755 --- a/lib/container/stop +++ b/lib/container/stop @@ -20,7 +20,7 @@ set -e COMMAND="$(basename ${0})" -CONFIG="/etc/container-tools/config" +CONFIG="/etc/systemd/nspawn" HOOKS="/etc/container-tools/hooks" MACHINES="/var/lib/machines" @@ -126,7 +126,7 @@ STATE="$(machinectl show ${NAME} 2>&1 | awk -F= '/^State=/ { print $2 }')" case "${CLEAN}" in true) # Removing overlay mounts - CNT_OVERLAY="$(awk -F= '/^cnt.overlay=/ { print $2 }' ${CONFIG}/${NAME}.conf)" + CNT_OVERLAY="$(crudini --get ${CONFIG}/${NAME}.nspawn Files Overlay)" if [ -n "${CNT_OVERLAY}" ] then @@ -146,7 +146,7 @@ case "${CLEAN}" in fi # Removing rw bind mounts - BIND="$(awk -F= '/^bind=/ { print $2 }' ${CONFIG}/${NAME}.conf)" + BIND="$(crudini --get ${CONFIG}/${NAME}.nspawn Files Bind)" if [ -n "${BIND}" ] then @@ -161,7 +161,7 @@ case "${CLEAN}" in fi # Removing ro bind mounts - BIND_RO="$(awk -F= '/^bind-ro=/ { print $2 }' ${CONFIG}/${NAME}.conf)" + BIND_RO="$(crudini --get ${CONFIG}/${NAME}.nspawn Files BindReadOnly)" if [ -n "${BIND_RO}" ] then @@ -176,7 +176,7 @@ case "${CLEAN}" in fi # Removing network configuration - NETWORK_VETH_EXTRA_CONF="$(awk -F= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf)" + NETWORK_VETH_EXTRA_CONF="$(crudini --get ${CONFIG}/${NAME}.nspawn ContainerToolsStart network-veth-extra)" case "${NETWORK_VETH_EXTRA_CONF}" in "") -- cgit v1.2.3