Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 277473 | Differences between
and this patch

Collapse All | Expand All

(-)a/net/bridge.sh (-3 / +6 lines)
Lines 11-17 _config_vars="$_config_vars bridge bridge_add brctl" Link Here
11
11
12
_is_bridge()
12
_is_bridge()
13
{
13
{
14
	brctl show 2>/dev/null | grep -q "^${IFACE}[[:space:]]"
14
	# Ignore header line so as to allow for bridges named 'bridge'
15
	brctl show 2>/dev/null | sed '1,1d' | grep -q "^${IFACE}[[:space:]]"
15
}
16
}
16
17
17
bridge_pre_start()
18
bridge_pre_start()
Lines 88-101 bridge_post_stop() Link Here
88
	if _is_bridge; then
89
	if _is_bridge; then
89
		ebegin "Destroying bridge ${IFACE}"
90
		ebegin "Destroying bridge ${IFACE}"
90
		_down
91
		_down
92
		# Ignore header line so as to allow for bridges named 'bridge'
91
		ports="$(brctl show 2>/dev/null | \
93
		ports="$(brctl show 2>/dev/null | \
92
			sed -n -e '/^'"${IFACE}"'[[:space:]]/,/^\S/ { /^\('"${IFACE}"'[[:space:]]\|\t\)/s/^.*\t//p }')"
94
			sed -n -e '1,1d' -e '/^'"${IFACE}"'[[:space:]]/,/^\S/ { /^\('"${IFACE}"'[[:space:]]\|\t\)/s/^.*\t//p }')"
93
		delete=true
95
		delete=true
94
		iface=${IFACE}
96
		iface=${IFACE}
95
		eindent
97
		eindent
96
	else
98
	else
97
		# Work out if we're added to a bridge for removal or not
99
		# Work out if we're added to a bridge for removal or not
98
		eval set -- $(brctl show 2>/dev/null | sed -e "s/'/'\\\\''/g" -e "s/$/'/g" -e "s/^/'/g")
100
		# Ignore header line so as to allow for bridges named 'bridge'
101
		eval set -- $(brctl show 2>/dev/null | sed -e '1,1d' -e "s/'/'\\\\''/g" -e "s/$/'/g" -e "s/^/'/g")
99
		local line=
102
		local line=
100
		for line; do
103
		for line; do
101
			set -- ${line}
104
			set -- ${line}

Return to bug 277473