summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
authorTravis Kemen <thepeople@openwrt.org>2007-05-16 14:46:23 +0000
committerTravis Kemen <thepeople@openwrt.org>2007-05-16 14:46:23 +0000
commitff111c2511fb093fde422ac8f194bba53f457586 (patch)
tree277b40e1cf9f837804be21573c7a4af6f71ca5ed /package/base-files
parent8693233b735bc1b50fcf39daf9db6e0913aed3fa (diff)
downloadmtk-20170518-ff111c2511fb093fde422ac8f194bba53f457586.zip
mtk-20170518-ff111c2511fb093fde422ac8f194bba53f457586.tar.gz
mtk-20170518-ff111c2511fb093fde422ac8f194bba53f457586.tar.bz2
keep uci_set from saving things that have not changed
SVN-Revision: 7259
Diffstat (limited to 'package/base-files')
-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 a76300f..e029336 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'"
}