From ff04de0b45fe7f24685af3b9523260a313fd0942 Mon Sep 17 00:00:00 2001 From: Darren 'Tadgy' Austin Date: Wed, 13 Nov 2019 04:49:05 +0000 Subject: 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"). --- rc.inet1 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rc.inet1') 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 } -- cgit v1.2.3