add uci-defaults script to migrate vlan 0 to vlan 1 after sysupgrade on devices using the RTL8366s switch

SVN-Revision: 22625
master
Jo-Philipp Wich 15 years ago
parent 1172df6491
commit 6616951c15
  1. 13
      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
Loading…
Cancel
Save