All pastes #471731 Raw Edit

Mine

public text v1 · immutable
·published 2007-05-05 02:55 UTC
rendered paste body
Index: uci.sh
===================================================================
--- uci.sh	(revision 7093)
+++ 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'"
 }