aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-09-18 14:13:33 +0000
committerRoy Marples <roy@marples.name>2008-09-18 14:13:33 +0000
commitc4c024fc9d907706e3c8e0f31130a516955ba8ec (patch)
treee2d4c5e48cc68516bd7a684b4bf10653850715c4
parent223015920cb1c947d3dd13f4f0336d9c5fc8e607 (diff)
Allow an empty bridge with no options, Gentoo #237485.
-rw-r--r--net/bridge.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/bridge.sh b/net/bridge.sh
index 517fe72d..8ef771c7 100644
--- a/net/bridge.sh
+++ b/net/bridge.sh
@@ -16,12 +16,15 @@ _is_bridge()
bridge_pre_start()
{
- local ports= brif= iface="${IFACE}" e= x=
+ local brif= iface="${IFACE}" e= x=
local ports="$(_get_array "bridge_${IFVAR}")"
local opts="$(_get_array "brctl_${IFVAR}")"
eval brif=\$bridge_add_${IFVAR}
- [ -z "${ports}" -a -z "${brif}" -a -z "${opts}" ] && return 0
+ eval x=\${bridge_${IFVAR}-y\}
+ if [ -z "${brif}" -a -z "${opts}"] ; then
+ [ -n "${ports}" -o "${x}" != "y" ] || return 0
+ fi
[ -n "${ports}" ] && bridge_post_stop