net: remove _check_macvlan function

This test is incorrect, and we do not need the modprobe. If macvlan is a
module, it is automatically modprobed when the first macvlan link is
added. Also, the /sys directory referred to in the test does not exist
if macvlan is built into the kernel.

Reported-by: Marien Zwart <marienz@gentoo.org>
X-Gentoo-Bug: 396427
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=396427
This commit is contained in:
William Hubbs 2011-12-29 18:00:25 -06:00
parent 6c8e8e2a96
commit 759f4ca4f2

View File

@ -24,17 +24,6 @@ _is_macvlan()
[ -n "$(export RC_SVCNAME="net.${IFACE}"; service_get_value macvlan)" ] [ -n "$(export RC_SVCNAME="net.${IFACE}"; service_get_value macvlan)" ]
} }
_check_macvlan()
{
if [ ! -d /sys/module/macvlan ]; then
modprobe macvlan
if [ ! -d /sys/module/macvlan ]; then
eerror "MAC-VLAN support is not present in this kernel"
return 1
fi
fi
}
macvlan_pre_start() macvlan_pre_start()
{ {
# MAC-VLAN needs an existing interface to link to # MAC-VLAN needs an existing interface to link to
@ -42,8 +31,6 @@ macvlan_pre_start()
eval macvlan=\$macvlan_${IFVAR} eval macvlan=\$macvlan_${IFVAR}
[ -z "${macvlan}" ] && return 0 [ -z "${macvlan}" ] && return 0
_check_macvlan || return 1
case " ${MODULES} " in case " ${MODULES} " in
*" ifconfig "*) *" ifconfig "*)
eerror "sys-apps/iproute2 is required to configure MACVLANs" eerror "sys-apps/iproute2 is required to configure MACVLANs"