From c4c024fc9d907706e3c8e0f31130a516955ba8ec Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 18 Sep 2008 14:13:33 +0000 Subject: Allow an empty bridge with no options, Gentoo #237485. --- net/bridge.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'net') 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 -- cgit v1.2.3