don't include the wan port in the initial vlan configuration used by netmsg (fixes...
authorFelix Fietkau <nbd@openwrt.org>
Tue, 31 Jan 2006 13:23:18 +0000 (13:23 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 31 Jan 2006 13:23:18 +0000 (13:23 +0000)
SVN-Revision: 3083

openwrt/package/base-files/default/etc/preinit

index 509f378a88d63e008e54ffe8cffef448c49f795d..d4e99277d55574f4f00f9bc196ce62471d73d43a 100755 (executable)
@@ -8,6 +8,10 @@ ifconfig eth0 up
 insmod switch-core
 insmod switch-robo || insmod switch-adm || rmmod switch-core
 
+case "$(nvram get boardtype)" in
+       0x0467) failsafe_vlan="0 1 2 3 5u*";;
+       *) failsafe_vlan="1 2 3 4 5u*";;
+esac
 # save the boot loader's vlan config
 # we need it on some routers that have no vlan*ports set
 [ -d /proc/switch/eth0 ] && {
@@ -15,7 +19,7 @@ insmod switch-robo || insmod switch-adm || rmmod switch-core
        v1p="$(cat /proc/switch/eth0/vlan/1/ports)"
        v2p="$(cat /proc/switch/eth0/vlan/2/ports)"
        echo 1 > /proc/switch/eth0/reset
-       echo "0 1 2 3 4 5u*" > /proc/switch/eth0/vlan/0/ports
+       echo "$failsafe_vlan" > /proc/switch/eth0/vlan/0/ports
 }
 
 # this delay is apparently necessary because the link isn't up yet