summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf
diff options
context:
space:
mode:
authorNik Lutz <nik@netstyle.ch>2016-05-18 16:20:33 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-05-18 18:26:07 +0000
commitcfe08b9c7149a5dc1b70d665ce918cede8e484ba (patch)
tree32a7d9edee28eed1874ce1374235749dcbfc0137 /share/scripts/debconf
parentUsing eth[0-9] instead of host[0-9] in containers /etc/network/interface. (diff)
downloadcompute-tools-cfe08b9c7149a5dc1b70d665ce918cede8e484ba.tar.xz
compute-tools-cfe08b9c7149a5dc1b70d665ce918cede8e484ba.zip
Replacing systemd-nspawn '--network-bridge=' with one config file per interface in /etc/network/interfaces.d.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-xshare/scripts/debconf5
1 files changed, 4 insertions, 1 deletions
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