bridge: check if iproute2 is available and use it to configure bridge options
This commit is contained in:
parent
e7ee26ac19
commit
36eb6e3377
1 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue