From 1e03e6dc46624f658239c3179875bd28b67fa91a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 6 Oct 2017 17:05:42 +0200 Subject: Switching to systemd-nspawn configuration files from /etc/container-tools/config. Signed-off-by: Daniel Baumann --- share/config/container.conf.in | 28 ---------------------------- share/config/container.nspawn.in | 28 ++++++++++++++++++++++++++++ share/man/container-create-curl.1.txt | 2 +- share/man/container-create-debconf.1.txt | 2 +- share/scripts/debconf | 10 +++++----- 5 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 share/config/container.conf.in create mode 100644 share/config/container.nspawn.in (limited to 'share') diff --git a/share/config/container.conf.in b/share/config/container.conf.in deleted file mode 100644 index 322e2c9..0000000 --- a/share/config/container.conf.in +++ /dev/null @@ -1,28 +0,0 @@ -# container-tools: @NAME@ - -[start] -cnt.auto=@CNT_AUTO@ -cnt.container-server=@CNT_CONTAINER_SERVER@ -cnt.network-bridge=@CNT_NETWORK_BRIDGE@ -cnt.overlay=@CNT_OVERLAY@ -bind=@BIND@ -bind-ro=@BIND_RO@ -boot=@BOOT@ -capability=@CAPABILITY@ -directory=@DIRECTORY@ -drop-capability=@DROP_CAPABILITY@ -link-journal=@LINK_JOURNAL@ -machine=@MACHINE@ -network-veth-extra=@NETWORK_VETH_EXTRA@ -private-users=@PRIVATE_USERS@ -register=@REGISTER@ - -[limit] -BlockIODeviceWeight= -BlockIOReadBandwidth= -BlockIOWeight= -BlockIOWriteBandwidth= -CPUQuota= -CPUShares= -MemoryLimit= -TasksMax= diff --git a/share/config/container.nspawn.in b/share/config/container.nspawn.in new file mode 100644 index 0000000..322e2c9 --- /dev/null +++ b/share/config/container.nspawn.in @@ -0,0 +1,28 @@ +# container-tools: @NAME@ + +[start] +cnt.auto=@CNT_AUTO@ +cnt.container-server=@CNT_CONTAINER_SERVER@ +cnt.network-bridge=@CNT_NETWORK_BRIDGE@ +cnt.overlay=@CNT_OVERLAY@ +bind=@BIND@ +bind-ro=@BIND_RO@ +boot=@BOOT@ +capability=@CAPABILITY@ +directory=@DIRECTORY@ +drop-capability=@DROP_CAPABILITY@ +link-journal=@LINK_JOURNAL@ +machine=@MACHINE@ +network-veth-extra=@NETWORK_VETH_EXTRA@ +private-users=@PRIVATE_USERS@ +register=@REGISTER@ + +[limit] +BlockIODeviceWeight= +BlockIOReadBandwidth= +BlockIOWeight= +BlockIOWriteBandwidth= +CPUQuota= +CPUShares= +MemoryLimit= +TasksMax= diff --git a/share/man/container-create-curl.1.txt b/share/man/container-create-curl.1.txt index 543a261..131da46 100644 --- a/share/man/container-create-curl.1.txt +++ b/share/man/container-create-curl.1.txt @@ -84,7 +84,7 @@ FILES ----- The following files are used: -*/etc/container-tools/config*:: +*/etc/systemd/nspawn*:: Container configuration files. */usr/share/container-tools/scripts*:: diff --git a/share/man/container-create-debconf.1.txt b/share/man/container-create-debconf.1.txt index db4028b..f9c7dd7 100644 --- a/share/man/container-create-debconf.1.txt +++ b/share/man/container-create-debconf.1.txt @@ -113,7 +113,7 @@ FILES ----- The following files are used: -*/etc/container-tools/config*:: +*/etc/systemd/nspawn*:: Container configuration files. */usr/share/container-tools/scripts*:: diff --git a/share/scripts/debconf b/share/scripts/debconf index 77a974a..8635b8e 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -23,7 +23,7 @@ set -e SCRIPT="${0}" export SCRIPT -CONFIG="/etc/container-tools/config" +CONFIG="/etc/systemd/nspawn" HOOKS="/etc/container-tools/hooks" MACHINES="/var/lib/machines" @@ -447,7 +447,7 @@ EOF cp "${DIRECTORY}/usr/share/sysvinit/inittab" "${DIRECTORY}/etc/inittab" fi - # Removing resolv.conf + # Removing resolvc.conf #rm -f "${DIRECTORY}/etc/resolv.conf" # FIXME: needs to stay for the moment rm -f "${DIRECTORY}/etc/resolv.conf" @@ -948,7 +948,7 @@ Commands () -e "s|^bind=.*|bind=${BIND}|g" \ -e "s|^bind-ro=.*|bind-ro=${BIND_RO}|g" \ -e "s|^network-veth-extra=.*|network-veth-extra=${HOST_INTERFACE_NAME}:eno1|g" \ - "${CONFIG}/${NAME}.conf" + "${CONFIG}/${NAME}.nspawn" if [ "${NETWORK_NUMBER}" -ge 2 ] then @@ -966,10 +966,10 @@ Commands () HOST_INTERFACE_NAME="$(echo ${HOST_INTERFACE_NAME:-veth-${HOSTNAME_SHORT}-${NUMBER}})" CONTAINER_INTERFACE_NAME="eno${NUMBER}" - sed -i -e "/^register=.*/ a network-veth-extra=${HOST_INTERFACE_NAME}:${CONTAINER_INTERFACE_NAME}" "${CONFIG}/${NAME}.conf" + sed -i -e "/^register=.*/ a network-veth-extra=${HOST_INTERFACE_NAME}:${CONTAINER_INTERFACE_NAME}" "${CONFIG}/${NAME}.nspawn" eval BRIDGE="$`echo NETWORK${NUMBER}_BRIDGE`" - sed -i -e "/^register=.*/ a cnt.network-bridge=${HOST_INTERFACE_NAME}:${BRIDGE:-bridge${NUMBER}}" "${CONFIG}/${NAME}.conf" + sed -i -e "/^register=.*/ a cnt.network-bridge=${HOST_INTERFACE_NAME}:${BRIDGE:-bridge${NUMBER}}" "${CONFIG}/${NAME}.nspawn" done fi -- cgit v1.2.3