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

Collapse All | Expand All

(-)a/net/iproute2.sh (-9 / +6 lines)
Lines 70-88 _set_flag() Link Here
70
70
71
_get_mac_address()
71
_get_mac_address()
72
{
72
{
73
	local mac=$(LC_ALL=C ip link show "${IFACE}" | sed -n \
73
	local mac=
74
		-e 'y/abcdef/ABCDEF/' \
74
	read -r mac < /sys/class/net/"${IFACE}"/address || return 1
75
		-e '/link\// s/^.*\<\(..:..:..:..:..:..\)\>.*/\1/p')
76
75
77
	case "${mac}" in
76
	case "${mac}" in
78
		00:00:00:00:00:00);;
77
		00:00:00:00:00:00) return 1 ;;
79
		44:44:44:44:44:44);;
78
		44:44:44:44:44:44) return 1 ;;
80
		FF:FF:FF:FF:FF:FF);;
79
		ff:ff:ff:ff:ff:ff) return 1 ;;
81
		"");;
82
		*) echo "${mac}"; return 0;;
83
	esac
80
	esac
84
81
85
	return 1
82
	printf '%s\n' "${mac}" | tr 'abcdef' 'ABCDEF'
86
}
83
}
87
84
88
_set_mac_address()
85
_set_mac_address()

Return to bug 766758