aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-08-13 19:29:51 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-08-13 19:29:51 +0000
commit6616951c15bef73a09da4cbbe2eb956e74e8b164 (patch)
treeef185e74966ce39f2bc2033c3de17118dd2ed09f /target/linux/ar71xx
parent1172df64917821573e730c40844504e628683961 (diff)
downloadupstream-6616951c15bef73a09da4cbbe2eb956e74e8b164.tar.gz
upstream-6616951c15bef73a09da4cbbe2eb956e74e8b164.tar.bz2
upstream-6616951c15bef73a09da4cbbe2eb956e74e8b164.zip
add uci-defaults script to migrate vlan 0 to vlan 1 after sysupgrade on devices using the RTL8366s switch
SVN-Revision: 22625
Diffstat (limited to 'target/linux/ar71xx')
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/uci-defaults/vlan-migration13
1 files changed, 13 insertions, 0 deletions
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
index 0000000000..bea9493c8e
--- /dev/null
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/vlan-migration
@@ -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