diff options
Diffstat (limited to 'share')
-rw-r--r-- | share/config/container.nspawn.in (renamed from share/config/container.conf.in) | 28 | ||||
-rwxr-xr-x | share/scripts/debconf | 8 |
2 files changed, 22 insertions, 14 deletions
diff --git a/share/config/container.conf.in b/share/config/container.nspawn.in index 322e2c9..774df95 100644 --- a/share/config/container.conf.in +++ b/share/config/container.nspawn.in @@ -1,23 +1,31 @@ -# container-tools: @NAME@ +# systemd-nspawn @NAME@ -[start] +[Exec] +Boot=@BOOT@ +Capability=@CAPABILITY@ +DropCapability=@DROP_CAPABILITY@ +PrivateUsers=@PRIVATE_USERS@ + +[Files] +Bind=@BIND@ +BindReadOnly=@BIND_RO@ +Overlay=@CNT_OVERLAY@ + +[Network] +VirtualEthernetExtra= + +# open-infrastructure-container-tools extension +[ContainerToolsStart] 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] +[ContainerToolsLimit] BlockIODeviceWeight= BlockIOReadBandwidth= BlockIOWeight= diff --git a/share/scripts/debconf b/share/scripts/debconf index 38bf937..9e74662 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -20,7 +20,7 @@ set -e SCRIPT="${0}" -CONFIG="/etc/container-tools/config" +CONFIG="/etc/systemd/nspawn" HOOKS="/etc/container-tools/hooks" MACHINES="/var/lib/machines" @@ -937,7 +937,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}:eth0|g" \ - "${CONFIG}/${NAME}.conf" + "${CONFIG}/${NAME}.nspawn" for NUMBER in $(seq 1 ${NETWORK_NUMBER}) do @@ -953,10 +953,10 @@ Commands () HOST_INTERFACE_NAME="$(echo ${HOST_INTERFACE_NAME:-veth-${HOSTNAME_SHORT}-${NUMBER}})" CONTAINER_INTERFACE_NAME="eth${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:-br${NUMBER}}" "${CONFIG}/${NAME}.conf" + sed -i -e "/^register=.*/ a cnt.network-bridge=${HOST_INTERFACE_NAME}:${BRIDGE:-br${NUMBER}}" "${CONFIG}/${NAME}.nspawn" done # Setting root password |