mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
21 lines
324 B
Bash
21 lines
324 B
Bash
#!/bin/sh
|
|
|
|
. /lib/functions.sh
|
|
|
|
rename_section() {
|
|
local enable inst
|
|
|
|
config_get interface "${1}" interface ""
|
|
if [ -z "${interface}" ]; then
|
|
return 0
|
|
fi
|
|
|
|
inst="$(echo "${1}"|cut -d '_' -f 2)"
|
|
uci_rename twamp "${1}" "${interface}_${inst}"
|
|
}
|
|
|
|
config_load twamp
|
|
config_foreach rename_section twamp_reflector
|
|
|
|
exit 0
|
|
|