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

Collapse All | Expand All

(-)bridge.sh4 (-2 / +4 lines)
Lines 7-13 bridge_depend() Link Here
7
	program brctl ip
7
	program brctl ip
8
}
8
}
9
9
10
_config_vars="$_config_vars bridge bridge_add brctl"
10
_config_vars="$_config_vars bridge bridge_add brctl mtu"
11
11
12
_is_bridge()
12
_is_bridge()
13
{
13
{
Lines 38-47 bridge_pre_start() Link Here
38
	local brctl_opts="$(_get_array "brctl_${IFVAR}")"
38
	local brctl_opts="$(_get_array "brctl_${IFVAR}")"
39
	# brif is used for dynamic add
39
	# brif is used for dynamic add
40
	eval brif=\$bridge_add_${IFVAR}
40
	eval brif=\$bridge_add_${IFVAR}
41
	eval mtu=\$mtu_${IFVAR}
41
42
42
	local do_iproute2=false do_brctl=false
43
	local do_iproute2=false do_brctl=false
43
	if [ -n "${brctl_opts}" ] && type brctl >/dev/null 2>&1; then
44
	if [ -n "${brctl_opts}" ] && type brctl >/dev/null 2>&1; then
44
		do_brctl=true
45
		do_brctl=true
46
		[ -n "$mtu" ] && type ip >/dev/null 2>&1 && do_iproute2=true
45
	elif type ip >/dev/null 2>&1; then
47
	elif type ip >/dev/null 2>&1; then
46
		do_iproute2=true
48
		do_iproute2=true
47
	elif type brctl >/dev/null 2>&1; then
49
	elif type brctl >/dev/null 2>&1; then
Lines 81-87 bridge_pre_start() Link Here
81
	if ! _is_bridge ; then
83
	if ! _is_bridge ; then
82
		ebegin "Creating bridge ${IFACE}"
84
		ebegin "Creating bridge ${IFACE}"
83
		if ${do_iproute2}; then
85
		if ${do_iproute2}; then
84
			ip link add "${IFACE}" type bridge
86
			ip link add "${IFACE}" ${mtu:+mtu "${mtu}"} type bridge
85
			rc=$?
87
			rc=$?
86
		elif ${do_brctl}; then
88
		elif ${do_brctl}; then
87
			brctl addbr "${IFACE}"
89
			brctl addbr "${IFACE}"

Return to bug 588810