2
0

03_network-vlan-migration 339 B

12345678910111213
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2010 OpenWrt.org
  4. #
  5. dev="$(uci -q get network.@switch_vlan[0].device)"
  6. vlan="$(uci -q get network.@switch_vlan[0].vlan)"
  7. if [ "$dev" = "rtl8366s" ] && [ "$vlan" = 0 ]; then
  8. logger -t vlan-migration "VLAN 0 is invalid for RTL8366s, changing to 1"
  9. uci set network.@switch_vlan[0].vlan=1
  10. uci commit network
  11. fi