3 # Copyright (C) 2013 OpenWrt.org
10 do_change_switch_name
() {
17 config_get val
"$config" $option
18 [ "$val" != "$oldname" ] && return 0
20 uci_set network
"$config" $option $newname
26 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"
79 migrate_switch_name
"eth0" "switch0"
84 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"