mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-12 03:58:40 +01:00
iup: keepuserconfig: improve the functionality refs #11467
the keepuserconfig option is checked in the config received though provisioning, and not in the config currently configured on the router.
This commit is contained in:
parent
2c7dc5c60b
commit
4141ba46ec
1 changed files with 9 additions and 5 deletions
|
|
@ -68,9 +68,6 @@ reload ()
|
|||
|
||||
save_usercfg()
|
||||
{
|
||||
local keep=$(uci -q get provisioning.configserver.keepuserconfig )
|
||||
[ "$keep" == "on" ] || return
|
||||
|
||||
rm -f $IUPUSERCFG $IUPUSERCFG_WIFI
|
||||
touch $IUPUSERCFG $IUPUSERCFG_WIFI
|
||||
|
||||
|
|
@ -110,8 +107,15 @@ save_usercfg()
|
|||
|
||||
apply_usercfg()
|
||||
{
|
||||
local keep=$(uci -q get provisioning.configserver.keepuserconfig )
|
||||
[ "$keep" == "on" ] || return
|
||||
# decide to save the user changes based on keepuserconfig received through provisioning
|
||||
local keep
|
||||
config_load provisioning
|
||||
config_get_bool keep configserver keepuserconfig "0"
|
||||
v "apply_usercfg(): keepuserconfig = $keep"
|
||||
if [ "$keep" != "1" ] ; then
|
||||
rm -f $IUPUSERCFG $IUPUSERCFG_WIFI
|
||||
return
|
||||
fi
|
||||
|
||||
local index ifname network
|
||||
local newindex newifname newnetwork
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue