summaryrefslogtreecommitdiffstats
path: root/rc.inet1
diff options
context:
space:
mode:
authorDarren 'Tadgy' Austin <darren@afterdark.org.uk>2019-11-13 04:49:05 +0000
committerRobby Workman <rworkman@slackware.com>2019-11-13 00:22:00 -0600
commitff04de0b45fe7f24685af3b9523260a313fd0942 (patch)
treea80de479636fac90e78cb8334f25e5172bf8873e /rc.inet1
parent81f8f8a24fa6d91eb67c8b6bd215afb779722b65 (diff)
downloadslacknetsetup-ff04de0b45fe7f24685af3b9523260a313fd0942.tar.xz
Added support for a BROPTS variable to set bridge specific settings.
Before, it was not possible to set bridge specific options when creating a bridge. This option adds the ability to set options via a BROPTS variable, which takes a pipe (|) delimited set of options as documented in the ip-link(8) man page (search for "BRIDGE Type Support").
Diffstat (limited to 'rc.inet1')
-rw-r--r--rc.inet16
1 files changed, 6 insertions, 0 deletions
diff --git a/rc.inet1 b/rc.inet1
index 9e2ca2b..5e31c08 100644
--- a/rc.inet1
+++ b/rc.inet1
@@ -154,6 +154,12 @@ br_open() {
debug_log "/sbin/ip link set dev $BRIF up"
/sbin/ip link set dev $BRIF up
done
+ while read -r -d \| BROPT; do
+ if [ -n "$BROPT" ]; then
+ debug_log "/sbin/ip link set dev ${IFNAME[$1]} type bridge $BROPT"
+ /sbin/ip link set dev ${IFNAME[$1]} type bridge $BROPT
+ fi
+ done <<<"${BROPTS[$i]}|" # The | on the end is required.
debug_log "/sbin/ip link set dev ${IFNAME[$1]} up"
/sbin/ip link set dev ${IFNAME[$1]} up
}