openwrtv3/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-vlan-migration
Luka Perkov 92e6e80080 targets: files in uci-defaults do not need to be executables
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 44304
2015-02-07 19:58:52 +00:00

13 lines
351 B
Bash

#!/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