- config_get type "$CONFIG" TYPE
- [ -z "$type" ]
- ) || uci_add_update "$PACKAGE" "CONFIG_SECTION='$CONFIG'${N}option '$OPTION' '$VALUE'"
+ 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'"