[ar71xx] add uci-defaults script to migrate vlan 0 to vlan 1 after sysupgrade on...
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 13 Aug 2010 19:29:51 +0000 (19:29 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 13 Aug 2010 19:29:51 +0000 (19:29 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22625 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/ar71xx/base-files/etc/uci-defaults/vlan-migration [new file with mode: 0755]

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/vlan-migration b/target/linux/ar71xx/base-files/etc/uci-defaults/vlan-migration
new file mode 100755 (executable)
index 0000000..bea9493
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Copyright (C) 2010 OpenWrt.org
+#
+
+local dev="$(uci -q get network.@switch_vlan[0].device)"
+local vlan="$(uci -q get network.@switch_vlan[0].vlan)"
+
+if [ "$dev" = "rtl8366s" ] && [ "$vlan" = 0 ]; then
+       logger -t vlan-migration "VLAN 0 is invalid for RTL8366s, changing to 1"
+       uci set network.@switch_vlan[0].vlan=1
+       uci commit network
+fi
This page took 0.02215 seconds and 4 git commands to generate.