From 838c9efb36b3b058c5a5b9d0e8c6d4d4789a44b9 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 18 Mar 2013 18:29:36 -0500 Subject: Remove gentoo's net.* scripts It has been determined that it will be best for gentoo's net.* scripts to be in a separate package to allow independent development. This package will be called netifrc and maintained by Gentoo. --- net/macvlan.sh | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 net/macvlan.sh (limited to 'net/macvlan.sh') diff --git a/net/macvlan.sh b/net/macvlan.sh deleted file mode 100644 index 1b95f5c0..00000000 --- a/net/macvlan.sh +++ /dev/null @@ -1,53 +0,0 @@ -# 2011-09-22 Stef Simoens -# based on vlan.sh & tuntap.sh -# Copyright (c) 2007-2008 Roy Marples -# All rights reserved. Released under the 2-clause BSD license. - -macvlan_depend() -{ - program ip - after interface - before dhcp macchanger -} - -_is_macvlan() -{ - [ -n "$(RC_SVCNAME="net.${IFACE}"; export RC_SVCNAME ; service_get_value macvlan)" ] -} - -macvlan_pre_start() -{ - # MAC-VLAN needs an existing interface to link to - local macvlan= - eval macvlan=\$macvlan_${IFVAR} - [ -z "${macvlan}" ] && return 0 - - case " ${MODULES} " in - *" ifconfig "*) - eerror "sys-apps/iproute2 is required to configure MACVLANs" - return 1 ;; - esac - - # optional mode, default to "private" - local mode= - eval mode=\$mode_${IFVAR} - [ -z "${mode}" ] && mode="private" - - ebegin "Creating MAC-VLAN ${IFACE} to ${macvlan}" - e="$(ip link add link "${macvlan}" name "${IFACE}" type macvlan mode "${mode}" 2>&1 1>/dev/null)" - if [ -n "${e}" ]; then - eend 1 "${e}" - else - eend 0 && _up && service_set_value macvlan "${macvlan}" - fi -} - - -macvlan_post_stop() -{ - _is_macvlan || return 0 - - ebegin "Removing MAC-VLAN ${IFACE}" - ip link delete "${IFACE}" type macvlan >/dev/null - eend $? -} -- cgit v1.2.3