From 36eb6e33773acf7d53f23474c8c57f7299c6b017 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Wed, 14 Oct 2020 13:19:17 -0600 Subject: [PATCH] bridge: check if iproute2 is available and use it to configure bridge options --- executor-scripts/linux/bridge | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/executor-scripts/linux/bridge b/executor-scripts/linux/bridge index ef2a091..542f62f 100755 --- a/executor-scripts/linux/bridge +++ b/executor-scripts/linux/bridge @@ -73,7 +73,7 @@ del_ports() { done } -set_bridge_opts() { +set_bridge_opts_brctl() { [ -n "$IF_BRIDGE_AGEING" ] \ && brctl setageing $IFACE $IF_BRIDGE_AGEING [ -n "$IF_BRIDGE_BRIDGEPRIO" ] \ @@ -94,6 +94,14 @@ set_bridge_opts() { && brctl stp $IFACE $IF_BRIDGE_STP } +set_bridge_opts_iproute2() { +} + +set_bridge_opts() { + [ -x /sbin/bridge ] && set_bridge_opts_iproute2 && return 0 + [ -x /sbin/brctl ] && set_bridge_opts_brctl && return 0 +} + all_ports_ready() { local port= for port in $PORTS; do