From 863c80ccd5adbd84dd503f33f24036ca4a6b3b48 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 28 Apr 2022 12:53:39 +0200 Subject: Merging upstream version 20220428. Signed-off-by: Daniel Baumann --- libexec/container/start | 17 ++++++++++------- libexec/container/stop | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'libexec') diff --git a/libexec/container/start b/libexec/container/start index f899446..da6be24 100755 --- a/libexec/container/start +++ b/libexec/container/start @@ -390,15 +390,18 @@ then if [ -n "${BRIDGE}" ] && [ -n "${INTERFACE}" ] then -cat > "/etc/network/interfaces.d/${INTERFACE}" << EOF -allow-hotplug ${INTERFACE} -iface ${INTERFACE} inet manual - pre-up ip link set ${INTERFACE} up - post-up ip link set ${INTERFACE} master ${BRIDGE} - pre-down ip link set ${INTERFACE} nomaster - post-down ip link set ${INTERFACE} down + mkdir -p /run/systemd/network + +cat > "/run/systemd/network/${INTERFACE}.network" << EOF +[Match] +Name=${INTERFACE} + +[Network] +Bridge=${BRIDGE} EOF + networkctl reload + else echo "Warning bridge definition '${BRIDGE_DEFINITION}' not recognized (expected :): Ignoring" fi diff --git a/libexec/container/stop b/libexec/container/stop index 98b2afa..d2db38e 100755 --- a/libexec/container/stop +++ b/libexec/container/stop @@ -220,7 +220,7 @@ case "${CLEAN}" in for VETH in ${VETHS} do INTERFACE="$(echo ${VETH} | awk -F: '{ print $1 }')" - FILE="/etc/network/interfaces.d/${INTERFACE}" + FILE="/run/systemd/network/${INTERFACE}.network" if [ -f "${FILE}" ] then -- cgit v1.2.3