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 | ff111c2511fb093fde422ac8f194bba53f457586 (patch) | |
tree | 277b40e1cf9f837804be21573c7a4af6f71ca5ed /package/base-files/files/lib | |
parent | 8693233b735bc1b50fcf39daf9db6e0913aed3fa (diff) | |
download | upstream-ff111c2511fb093fde422ac8f194bba53f457586.tar.gz upstream-ff111c2511fb093fde422ac8f194bba53f457586.tar.bz2 upstream-ff111c2511fb093fde422ac8f194bba53f457586.zip |
keep uci_set from saving things that have not changed
SVN-Revision: 7259
Diffstat (limited to 'package/base-files/files/lib')
-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'" } |