mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
map-controller: config: add name to unique sections
channel_plan and sta_steering are unique sections, and should be named. Additionally added uci-default script to name the sections if missing
This commit is contained in:
parent
bf06544066
commit
b23e510dd3
2 changed files with 20 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ config controller 'controller'
|
|||
option stale_sta_timeout '20d'
|
||||
option de_collect_interval '60'
|
||||
|
||||
config sta_steering
|
||||
config sta_steering 'sta_steering'
|
||||
option enable_sta_steer '1'
|
||||
option enable_bsta_steer '0'
|
||||
option rcpi_threshold_2g '70'
|
||||
|
|
@ -23,7 +23,7 @@ config sta_steering
|
|||
option plugins_policy 'any'
|
||||
list plugins 'rcpi'
|
||||
|
||||
config channel_plan
|
||||
config channel_plan 'channel_plan'
|
||||
option preclear_dfs '0'
|
||||
option acs '0'
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
cfg=mapcontroller
|
||||
|
||||
# singleton sections
|
||||
sections="channel_plan sta_steering"
|
||||
|
||||
for sec in $sections; do
|
||||
# find unnamed section of given type, only index 0
|
||||
s=$(uci show $cfg | grep -oE "@${sec}\[0\]" | sort -u)
|
||||
[ "$s" = "" ] && continue
|
||||
|
||||
uci rename $cfg.$s=$sec
|
||||
done
|
||||
|
||||
uci commit $cfg
|
||||
Loading…
Add table
Reference in a new issue