keep uci_set from saving things that have not changed
authorthepeople <thepeople@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 16 May 2007 14:46:23 +0000 (14:46 +0000)
committerthepeople <thepeople@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 16 May 2007 14:46:23 +0000 (14:46 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7259 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/base-files/files/lib/config/uci.sh

index a76300f..e029336 100644 (file)
@@ -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'"
 }
 
This page took 0.020925 seconds and 4 git commands to generate.