export initial vlan port settings in preinit, so that rcS can set them again
[openwrt/svn-archive/openwrt.git] / openwrt / package / base-files / default / etc / preinit
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