export initial vlan port settings in preinit, so that rcS can set them again
authorFelix Fietkau <nbd@openwrt.org>
Fri, 3 Nov 2006 04:38:20 +0000 (04:38 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 3 Nov 2006 04:38:20 +0000 (04:38 +0000)
SVN-Revision: 5401

openwrt/package/base-files/default/etc/init.d/rcS
openwrt/package/base-files/default/etc/preinit

index c887a19eb506ba6c8d8a059be30998c624ff2d9f..45e0bbe1987ff7be9379ca131ba1a1317b54581f 100755 (executable)
@@ -11,6 +11,7 @@
                echo "$v0p" > /proc/switch/eth0/vlan/0/ports
                echo "$v1p" > /proc/switch/eth0/vlan/1/ports
                echo "$v2p" > /proc/switch/eth0/vlan/2/ports
+               unset v0p v1p v2p
        }
        
        mount_root
index e8ac2d56edc42d211d3bceefea5f49bc03711c9d..fa5037b7ae5ed4a7b1b9cac3f46245cca36d80cf 100755 (executable)
@@ -24,9 +24,9 @@ ifconfig $ifname 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 up
 # save the boot loader's vlan config
 # we need it on some routers that have no vlan*ports set
 [ -d /proc/switch/eth0 ] && {
-       v0p="$(cat /proc/switch/eth0/vlan/0/ports)"
-       v1p="$(cat /proc/switch/eth0/vlan/1/ports)"
-       v2p="$(cat /proc/switch/eth0/vlan/2/ports)"
+       export v0p="$(cat /proc/switch/eth0/vlan/0/ports)"
+       export v1p="$(cat /proc/switch/eth0/vlan/1/ports)"
+       export v2p="$(cat /proc/switch/eth0/vlan/2/ports)"
        echo 1 > /proc/switch/eth0/reset
 
        # this would be easier if we blasted the message across all ports