From cfe08b9c7149a5dc1b70d665ce918cede8e484ba Mon Sep 17 00:00:00 2001 From: Nik Lutz Date: Wed, 18 May 2016 18:20:33 +0200 Subject: Replacing systemd-nspawn '--network-bridge=' with one config file per interface in /etc/network/interfaces.d. Signed-off-by: Daniel Baumann --- share/scripts/debconf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'share/scripts/debconf') diff --git a/share/scripts/debconf b/share/scripts/debconf index bbdd65c..3bacbeb 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -902,12 +902,12 @@ Commands () fi # config (FIXME) - sed -i -e "s|^network-bridge=.*|network-bridge=${NETWORK0_BRIDGE}|" "${CONFIG}/${NAME}.conf" # maximum of 15 characters, prefix is 'veth-' HOSTNAME_SHORT="$(echo ${NAME} | cut -c-8)" HOST_INTERFACE_NAME="$(echo ${NETWORK0_VETH:-veth-${HOSTNAME_SHORT}-0})" + sed -i -e "s|^cnt.network-bridge=.*|cnt.network-bridge=${HOST_INTERFACE_NAME}:${NETWORK0_BRIDGE:-br0}|g" "${CONFIG}/${NAME}.conf" sed -i -e "s|^network-veth-extra=.*|network-veth-extra=${HOST_INTERFACE_NAME}:eth0|g" "${CONFIG}/${NAME}.conf" for NUMBER in $(seq 1 ${NETWORK_NUMBER}) @@ -925,6 +925,9 @@ Commands () CONTAINER_INTERFACE_NAME="eth${NUMBER}" sed -i -e "/^register=.*/ a network-veth-extra=${HOST_INTERFACE_NAME}:${CONTAINER_INTERFACE_NAME}" "${CONFIG}/${NAME}.conf" + + eval BRIDGE="$`echo NETWORK${NUMBER}_BRIDGE`" + sed -i -e "/^register=.*/ a cnt.network-bridge=${HOST_INTERFACE_NAME}:${BRIDGE:-br${NUMBER}}" "${CONFIG}/${NAME}.conf" done # Setting root password -- cgit v1.2.3