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

Collapse All | Expand All

(-)/lib64/rc/net/bonding.sh.orig (-1 / +16 lines)
Lines 46-56 Link Here
46
		return 1
46
		return 1
47
	fi
47
	fi
48
48
49
	# Must ensure bond is down before configuring
50
	_down
51
49
	# Configure the bond.
52
	# Configure the bond.
50
	# Nice and dynamic :)
53
	# Must configure bonding mode first
54
	for x in /sys/class/net/"${IFACE}"/bonding/mode; do
55
		[ -f "${x}" ] || continue
56
		n=${x##*/}
57
		eval s=\$${n}_${IFVAR}
58
		if [ -n "${s}" ]; then
59
			einfo "Setting ${n}: ${s}"
60
			echo "${s}" >"${x}" || \
61
			eerror "Failed to configure $n (${n}_${IFVAR})"
62
		fi
63
	done
64
	# Nice and dynamic for remaining options:)
51
	for x in /sys/class/net/"${IFACE}"/bonding/*; do
65
	for x in /sys/class/net/"${IFACE}"/bonding/*; do
52
		[ -f "${x}" ] || continue
66
		[ -f "${x}" ] || continue
53
		n=${x##*/}
67
		n=${x##*/}
68
		[ "${n}" != "mode" ] || continue
54
		eval s=\$${n}_${IFVAR}
69
		eval s=\$${n}_${IFVAR}
55
		if [ -n "${s}" ]; then
70
		if [ -n "${s}" ]; then
56
			einfo "Setting ${n}: ${s}"
71
			einfo "Setting ${n}: ${s}"

Return to bug 341657