X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=package%2Fbase-files%2Ffiles%2Flib%2Fconfig%2Fuci.sh;h=e0293363b3a6e7abef55850b3fb4e00a3597b83d;hp=a76300fa0caa910929a0c33af1a7e581ea405751;hb=68677ee3023846ed94b51fefe1df7b6b003ef70b;hpb=0b03b903e55ae0619757e27e10e72e77790ac2e3 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'" }