bridge: check if iproute2 is available and use it to configure bridge options

This commit is contained in:
Ariadne Conill 2020-10-14 13:19:17 -06:00 committed by Maximilian Wilhelm
parent e7ee26ac19
commit 36eb6e3377

View file

@ -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