summaryrefslogtreecommitdiffstats
path: root/lib/container/create
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/create
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 'lib/container/create')
-rwxr-xr-xlib/container/create8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/container/create b/lib/container/create
index 570492f..050878e 100755
--- a/lib/container/create
+++ b/lib/container/create
@@ -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"
SCRIPTS="/usr/share/container-tools/scripts"
@@ -114,9 +114,9 @@ then
Usage
fi
-if [ -e "${CONFIG}/${NAME}.conf" ]
+if [ -e "${CONFIG}/${NAME}.nspawn" ]
then
- echo "'${NAME}': container already exists or ${CONFIG}/${NAME}.conf has not been removed" >&2
+ echo "'${NAME}': container already exists or ${CONFIG}/${NAME}.nspawn has not been removed" >&2
exit 1
fi
@@ -225,7 +225,7 @@ sed -e "s|@CNT_AUTO@|${CNT_AUTO}|g" \
-e "s|@NETWORK_VETH_EXTRA@|${NETWORK_VETH_EXTRA}|g" \
-e "s|@PRIVATE_USERS@|no|g" \
-e "s|@REGISTER@|yes|g" \
-/usr/share/container-tools/config/container.conf.in > "${CONFIG}/${NAME}.conf"
+/usr/share/container-tools/config/container.nspawn.in > "/etc/systemd/nspawn/${NAME}.nspawn"
# Run
"${SCRIPTS}/${SCRIPT}" $(echo "${@}" | sed -e 's| -- | |')