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/openrc-0.4.3/net/bridge.sh (-2 / +3 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
	brctl show 2>/dev/null | tail -n +2 | grep -q "^${IFACE}[[:space:]]"
15
}
15
}
16
16
17
bridge_pre_start()
17
bridge_pre_start()
Lines 89-101 bridge_post_stop() Link Here
89
		ebegin "Destroying bridge ${IFACE}"
89
		ebegin "Destroying bridge ${IFACE}"
90
		_down
90
		_down
91
		ports="$(brctl show 2>/dev/null | \
91
		ports="$(brctl show 2>/dev/null | \
92
			tail -n +2 | \
92
			sed -n -e '/^'"${IFACE}"'[[:space:]]/,/^\S/ { /^\('"${IFACE}"'[[:space:]]\|\t\)/s/^.*\t//p }')"
93
			sed -n -e '/^'"${IFACE}"'[[:space:]]/,/^\S/ { /^\('"${IFACE}"'[[:space:]]\|\t\)/s/^.*\t//p }')"
93
		delete=true
94
		delete=true
94
		iface=${IFACE}
95
		iface=${IFACE}
95
		eindent
96
		eindent
96
	else
97
	else
97
		# Work out if we're added to a bridge for removal or not
98
		# 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")
99
		eval set -- $(brctl show 2>/dev/null | tail -n +2 | sed -e "s/'/'\\\\''/g" -e "s/$/'/g" -e "s/^/'/g")
99
		local line=
100
		local line=
100
		for line; do
101
		for line; do
101
			set -- ${line}
102
			set -- ${line}

Return to bug 277473