Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 256956 Details for
Bug 346365
sys-apps/openrc: remove deprecated vconfig depend for vlan management
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Completely remove vconfig
complete-vconfig-remove.patch (text/plain), 3.71 KB, created by
Guillaume Castagnino
on 2010-12-12 11:45:55 UTC
(
hide
)
Description:
Completely remove vconfig
Filename:
MIME Type:
Creator:
Guillaume Castagnino
Created:
2010-12-12 11:45:55 UTC
Size:
3.71 KB
patch
obsolete
>diff --git a/doc/net.example.Linux.in b/doc/net.example.Linux.in >index 42e5477..ed20d84 100644 >--- a/doc/net.example.Linux.in >+++ b/doc/net.example.Linux.in >@@ -527,7 +527,7 @@ > > #----------------------------------------------------------------------------- > # VLAN (802.1q support) >-# For VLAN support, emerge net-misc/vconfig >+# For VLAN support, emerge sys-apps/iproute2 > > # Specify the VLAN numbers for the interface like so > # Please ensure your VLAN IDs are NOT zero-padded >@@ -537,10 +537,17 @@ > # need it up. > #config_eth0="null" > >-# You can also configure the VLAN - see for vconfig man page for more details >-#vconfig_eth0="set_name_type VLAN_PLUS_VID_NO_PAD" >-#vconfig_vlan1="set_flag 1 >-#set_egress_map 2 6" >+# You can also configure the VLAN - see for ip man page for more details >+# To change the vlan interface name. If not set, the standard "iface.vlanid" >+# will be used >+#vlan_1_name="vlan1" >+#vlan_2_name="eth0.2" >+# Set the vlan flags >+#vlan_1_flags="reorder_hdr off gvrp on loose_binding on" >+# Configure in/egress maps >+#vlan_1_ingress="2:6 3:5" >+#vlan_1_egress="1:2" >+ > #config_vlan1="172.16.3.1/23" > #config_vlan2="172.16.2.1/23" > >@@ -553,8 +560,7 @@ > # This means you do not need to create init scripts in /etc/init.d for each > # vlan, you must need to create one for the physical interface. > # If you wish to control the configuration of each vlan through a separate >-# script, or wish to rename the vlan interface to something that vconfig >-# cannot then you need to do this. >+# script then you need to do this. > #vlan_start_eth0="no" > > # If you do the above then you may want to depend on eth0 like so >diff --git a/net/vlan.sh b/net/vlan.sh >index c245051..6a8b84e 100644 >--- a/net/vlan.sh >+++ b/net/vlan.sh >@@ -1,9 +1,18 @@ > # Copyright (c) 2007-2008 Roy Marples <roy@marples.name> > # All rights reserved. Released under the 2-clause BSD license. > >+_ip() >+{ >+ if [ -x /bin/ip ]; then >+ echo /bin/ip >+ else >+ echo /sbin/ip >+ fi >+} >+ > vlan_depend() > { >- program /sbin/vconfig >+ program $(_ip) > after interface > before dhcp > } >@@ -34,35 +43,6 @@ _check_vlan() > fi > } > >-vlan_pre_start() >-{ >- local vc="$(_get_array "vconfig_${IFVAR}")" >- [ -z "${vc}" ] && return 0 >- >- _check_vlan || return 1 >- _exists || return 1 >- >- local v= x= e= >- local IFS="$__IFS" >- for v in ${vc}; do >- unset IFS >- case "${v}" in >- set_name_type" "*) x=${v};; >- *) >- set -- ${v} >- x="$1 ${IFACE}" >- shift >- x="${x} $@" >- ;; >- esac >- >- e="$(vconfig ${x} 2>&1 1>/dev/null)" >- [ -z "${e}" ] && continue >- eerror "${e}" >- return 1 >- done >-} >- > vlan_post_start() > { > local vlans= >@@ -72,10 +52,22 @@ vlan_post_start() > _check_vlan || return 1 > _exists || return 1 > >- local vlan= e= s= >+ local vlan= e= s= vname= vflags= vingress= vegress= > for vlan in ${vlans}; do > einfo "Adding VLAN ${vlan} to ${IFACE}" >- e="$(vconfig add "${IFACE}" "${vlan}" 2>&1 1>/dev/null)" >+ # We need to gather all interface configuration options >+ # 1) naming. Default to the standard "${IFACE}.${vlan}" but it can be anything >+ eval vname=\$vlan_${vlan}_name >+ [ -z "${vname}" ] && vname="${IFACE}.${vlan}" >+ # 2) flags >+ eval vflags=\$vlan_${vlan}_flags >+ # 3) ingress/egress map >+ eval vingress=\$vlan_${vlan}_ingress >+ [ -z "${vingress}" ] || vingress="ingress-qos-map ${vingress}" >+ eval vegress=\$vlan_${vlan}_egress >+ [ -z "${vegress}" ] || vegress="egress-qos-map ${vegress}" >+ >+ e="$(ip link add link "${IFACE}" name "${vname}" type vlan id "${vlan}" ${vflags} ${vingress} ${vegress} 2>&1 1>/dev/null)" > if [ -n "${e}" ]; then > eend 1 "${e}" > continue >@@ -110,7 +102,7 @@ vlan_post_stop() > stop > ) && { > mark_service_stopped "net.${vlan}" >- vconfig rem "${vlan}" >/dev/null >+ ip link delete "${vlan}" type vlan >/dev/null > } > done >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 346365
:
255055
| 256956