3 # Copyright (C) 2013 OpenWrt.org
8 do_change_switch_name
() {
15 config_get val
"$config" $option
16 [ "$val" != "$oldname" ] && return 0
18 uci_set network
"$config" $option $newname
24 migrate_switch_name
() {
32 logger
-t migrate-switchX
"Updating switch names in network configuration"
34 config_foreach do_change_switch_name switch name
$oldname $newname
35 config_foreach do_change_switch_name switch_vlan device
$oldname $newname
37 [ "$SWITCH_NAME_CHANGED" == "1" ] && {
38 logger
-t migrate-switchX
"Switch names updated, saving network configuration"
45 board
=$
(ar71xx_board_name
)
81 migrate_switch_name
"eth0" "switch0"
85 migrate_switch_name
"eth1" "switch0"
91 migrate_switch_name
"eth0" "switch0"
92 migrate_switch_name
"eth1" "switch1"
98 migrate_switch_name
"rtl8366s" "switch0"
102 migrate_switch_name
"rtl8366rb" "switch0"