summaryrefslogtreecommitdiffstats
path: root/lib/container/stop
diff options
context:
space:
mode:
Diffstat (limited to 'lib/container/stop')
-rwxr-xr-xlib/container/stop10
1 files changed, 5 insertions, 5 deletions
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
"")