diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2010-12-12 00:43:05 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2010-12-12 00:58:47 +0000 |
commit | 400b45d590b883050e171a34daec3fe40b58b76e (patch) | |
tree | c347a6d90a05480d6b691016ce5cb51833a2df04 /net | |
parent | e431599d0882d04e8e85e6f72649987e8f2bc4a1 (diff) |
Final documentation cleanup for updated bridge code.
Specifically document how to handle the case of explicitly starting a
bridge and then dynamically adding interfaces to it.
brctl_br0=''
bridge_add_eth0='br0'
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/bridge.sh b/net/bridge.sh index 2f6711e6..c0172ed7 100644 --- a/net/bridge.sh +++ b/net/bridge.sh @@ -32,16 +32,19 @@ _bridge_ports() bridge_pre_start() { local brif= oiface="${IFACE}" e= x= + # ports is for static add local ports="$(_get_array "bridge_${IFVAR}")" + # old config options local opts="$(_get_array "brctl_${IFVAR}")" - # brif is used for dynamic add eval brif=\$bridge_add_${IFVAR} - # ports is for static add + + # we need a way to if the bridge exists in a variable name, not just the + # contents of a variable. Eg if somebody has only bridge_add_eth0='br0', + # with no other lines mentioning br0. eval bridge_unset=\${bridge_${IFVAR}-y\} eval brctl_unset=\${brctl_${IFVAR}-y\} - # If we are not doing dynamic add on $IFACE, check for static ports. if [ -z "${brif}" -a "${brctl_unset}" == 'y' ]; then if [ -z "${ports}" -a "${bridge_unset}" == "y" ]; then #eerror "Misconfigured static bridge detected (see net.example)" |