openwrt_archive/target/linux/ar71xx/base-files/etc/uci-defaults/vlan-migration
Jo-Philipp Wich 875e3f26ce [backfire] merge r22625
SVN-Revision: 22626
2010-08-13 19:31:10 +00:00

14 lines
351 B
Bash
Executable File

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