summaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/base-files/etc/uci-defaults/vlan-migration
blob: bea9493c8eae4da7642d49be6d949d9a50a38e49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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