All pastes #490371 Raw Edit

Someone

public text v1 · immutable
·published 2007-05-15 23:49 UTC
rendered paste body
Index: base-files/files/lib/config/uci.sh
===================================================================
--- base-files/files/lib/config/uci.sh	(revision 7256)
+++ base-files/files/lib/config/uci.sh	(working copy)
@@ -76,8 +76,11 @@
 
 	( # 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'"
 }