add workaround for fixing the wrong (for us) asus wl-500gp wan port vlan settings
authorFelix Fietkau <nbd@openwrt.org>
Wed, 29 Nov 2006 17:23:11 +0000 (17:23 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 29 Nov 2006 17:23:11 +0000 (17:23 +0000)
SVN-Revision: 5678

openwrt/package/base-files/default/etc/init.d/S05nvram

index e4ce3755e1a8ee5b48f2300e99c5454c10c8be3d..21cd2edcfadd8a9ab5914745049855631b905cd1 100755 (executable)
@@ -103,6 +103,14 @@ nvram_default lan_proto static
 [  "$boardnum"  = "45" \
 -a "$boardtype" = "0x042f" ] && {
        debug "### wl-500g premium hacks ###"
+       [ -z "$(nvram get lan_ifnames_t)" || {
+               # hasn't been remapped yet, revert the vlan1 config as well, because
+               # it defaults to "0 5u", which we can't use.
+               # use lan_ifnames_t as an indicator of whether the config was made
+               # by the original firmware.
+               nvram unset vlan1ports
+               nvram unset lan_ifnames_t
+       }
        remap eth0.1 vlan0
        remap eth0 vlan1