summaryrefslogtreecommitdiffstats
path: root/lib/container/stop
diff options
context:
space:
mode:
authorSimon Spöhel <simon.spoehel@open-infrastructure.net>2017-07-09 13:52:29 +0000
committerSimon Spöhel <simon.spoehel@open-infrastructure.net>2017-07-09 15:14:27 +0000
commitb71a3b319fa347157973e45e4e08f407e2cb5d7e (patch)
tree234c9d9fdba16e7b997d4e73fc030f37510bde2e /lib/container/stop
parentUpdating output of container-shell help. (diff)
downloadcompute-tools-b71a3b319fa347157973e45e4e08f407e2cb5d7e.tar.xz
compute-tools-b71a3b319fa347157973e45e4e08f407e2cb5d7e.zip
Making container-tools use nspawn files.
Diffstat (limited to '')
-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
"")