2010-08-13 19:29:51 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (C) 2010 OpenWrt.org
|
|
|
|
#
|
|
|
|
|
2016-09-24 12:30:24 +00:00
|
|
|
dev="$(uci -q get network.@switch_vlan[0].device)"
|
|
|
|
vlan="$(uci -q get network.@switch_vlan[0].vlan)"
|
2010-08-13 19:29:51 +00:00
|
|
|
|
|
|
|
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
|