1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-20 05:15:19 +02:00

keep uci_set from saving things that have not changed

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7259 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
thepeople 2007-05-16 14:46:23 +00:00
parent 6dfe719aac
commit f4fb35b391

View File

@ -76,8 +76,11 @@ uci_set() {
( # spawn a subshell so you don't mess up the current environment ( # spawn a subshell so you don't mess up the current environment
uci_load "$PACKAGE" uci_load "$PACKAGE"
config_get OLDVAL "$CONFIG" "$OPTION"
if [ "$OLDVAL" != "$VALUE" ]; then
config_get type "$CONFIG" TYPE config_get type "$CONFIG" TYPE
[ -z "$type" ] [ -z "$type" ]
fi
) || uci_add_update "$PACKAGE" "config_set '$CONFIG' '$OPTION' '$VALUE'" ) || uci_add_update "$PACKAGE" "config_set '$CONFIG' '$OPTION' '$VALUE'"
} }