mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Fix RUTX support
This commit is contained in:
parent
6fc4d11e09
commit
0b14e36374
98 changed files with 11611 additions and 893 deletions
35
root/target/linux/ipq40xx/base-files/etc/uci-defaults/13_migrate-groups
Executable file
35
root/target/linux/ipq40xx/base-files/etc/uci-defaults/13_migrate-groups
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
. /lib/functions.sh
|
||||
|
||||
CONFIG="/etc/config/user_groups"
|
||||
|
||||
migrate_tel_list() {
|
||||
local tel="$1"
|
||||
local new_section="$2"
|
||||
|
||||
uci -q add_list user_groups."$new_section".tel="$tel"
|
||||
}
|
||||
|
||||
migrate_group() {
|
||||
local group="$1"
|
||||
local name
|
||||
|
||||
config_get name "$group" name ""
|
||||
local new_section=`uci -q add user_groups phone`
|
||||
uci -q set user_groups."$new_section".name="$name"
|
||||
config_list_foreach "$group" tel migrate_tel_list "$new_section"
|
||||
|
||||
uci -q delete sms_utils."$group"
|
||||
}
|
||||
|
||||
if [ ! -e "$CONFIG" ]; then
|
||||
touch "$CONFIG"
|
||||
fi
|
||||
|
||||
config_load sms_utils
|
||||
config_foreach migrate_group group
|
||||
|
||||
uci -q commit user_groups
|
||||
uci -q commit sms_utils
|
||||
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue