diff options
author | Travis Kemen <thepeople@openwrt.org> | 2007-05-16 14:46:23 +0000 |
---|---|---|
committer | Travis Kemen <thepeople@openwrt.org> | 2007-05-16 14:46:23 +0000 |
commit | 330a1018f68f0639b889d1b1b7c2f40ff4cc8c8d (patch) | |
tree | 1e17502cb0fb478a3f0bff78925a63cc0cb62bb3 /package/base-files | |
parent | 2a756cdce61a8312704365c3a19971fcabf62251 (diff) | |
download | upstream-330a1018f68f0639b889d1b1b7c2f40ff4cc8c8d.tar.gz upstream-330a1018f68f0639b889d1b1b7c2f40ff4cc8c8d.tar.bz2 upstream-330a1018f68f0639b889d1b1b7c2f40ff4cc8c8d.zip |
keep uci_set from saving things that have not changed
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7259 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files')
-rw-r--r-- | package/base-files/files/lib/config/uci.sh | 7 |
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'" } |