summaryrefslogtreecommitdiff
path: root/package/base-files/files/lib
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files/lib')
-rw-r--r--package/base-files/files/lib/config/uci.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/package/base-files/files/lib/config/uci.sh b/package/base-files/files/lib/config/uci.sh
index a76300fa0c..e0293363b3 100644
--- a/package/base-files/files/lib/config/uci.sh
+++ b/package/base-files/files/lib/config/uci.sh
@@ -76,8 +76,11 @@ uci_set() {
( # spawn a subshell so you don't mess up the current environment
uci_load "$PACKAGE"
- config_get type "$CONFIG" TYPE
- [ -z "$type" ]
+ config_get OLDVAL "$CONFIG" "$OPTION"
+ if [ "$OLDVAL" != "$VALUE" ]; then
+ config_get type "$CONFIG" TYPE
+ [ -z "$type" ]
+ fi
) || uci_add_update "$PACKAGE" "config_set '$CONFIG' '$OPTION' '$VALUE'"
}