- I noticed that the vlan package was last updated in 2005 and that the vconfig 
site said
   that 802.1Q VLAN code is part of the official kernel, and has been for years 
and
   years. It is very unlikely that you need to download anything from this 
site, the
   packages are left here for posterity's sake. 802.1Q VLANs can be created 
with the
   'ip' utility (vconfig works for vlans, but is crufty and deprecated).
- Based on this it seemed appropriate to replace the vconfig commands with ip 
commands.
- This patch set has been sent as an RFC PATCH as my replacement ip commands 
may or may
   not be correct and I am unable to test the effect as I do not have a pppoe 
connection
   using vlans.
- I am open to any modifications or any other decision with reagard to the vlan 
package

Signed-off-by: Adolf Belka <[email protected]>
---
 src/initscripts/networking/red | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/initscripts/networking/red b/src/initscripts/networking/red
index fddc70d92..6d779b365 100644
--- a/src/initscripts/networking/red
+++ b/src/initscripts/networking/red
@@ -251,7 +251,7 @@ case "${1}" in
                        if [ "$TYPE" == "vdsl" ]; then
                                boot_mesg "Creating VLAN Interface 
${DEVICE}.${INET_VLAN} ..."
                                modprobe 8021q
-                               vconfig add ${DEVICE} ${INET_VLAN}
+                               ip link add link ${DEVICE} name 
${DEVICE}.${INET_VLAN} type vlan id ${INET_VLAN}
                                if [ -n "$MAC1" ]; then
                                        boot_mesg "Setting mac address on 
${DEVICE}.${INET_VLAN} to ${MAC1}"    
                                        ip link set dev ${DEVICE}.${INET_VLAN} 
address ${MAC1}
@@ -276,7 +276,7 @@ case "${1}" in
                                if [ ! -f "$PIDFILE" ]; then
                                        boot_mesg "Creating VLAN Interface 
${DEVICE}.${IPTV_VLAN} ..."
                                        modprobe 8021q
-                                       vconfig add ${DEVICE} ${IPTV_VLAN}
+                                       ip link add link ${DEVICE} name 
${DEVICE}.${IPTV_VLAN} type vlan id ${IPTV_VLAN}
                                        if [ -n "$MAC2" ]; then
                                                boot_mesg "Setting mac address 
on ${DEVICE}.${IPTV_VLAN} to ${MAC2}"
                                                ip link set dev 
${DEVICE}.${IPTV_VLAN} address ${MAC2}
@@ -548,7 +548,7 @@ case "${1}" in
                                if echo "${link_status}" | grep -q UP; then
                                        boot_mesg "Bringing down the 
${DEVICE}.${INET_VLAN} interface..."
                                        ip link set ${DEVICE}.${INET_VLAN} down
-                                       vconfig rem ${DEVICE}.${INET_VLAN}
+                                       ip link delete ${DEVICE}.${INET_VLAN}
                                        evaluate_retval
                                fi
                        else
-- 
2.49.0


Reply via email to