aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2019-10-22 00:10:20 +0300
committerJohn Crispin <john@phrozen.org>2019-10-22 11:39:28 +0200
commit940844e077d7d41bc94728f42b39a65854d38b87 (patch)
treea7541f22e82806ad682c6e9366a5d423fdbe3d97 /package/base-files
parentc0e7ec91a0927002942631bbc995b90f5f7dd7ed (diff)
downloadupstream-940844e077d7d41bc94728f42b39a65854d38b87.tar.gz
upstream-940844e077d7d41bc94728f42b39a65854d38b87.tar.bz2
upstream-940844e077d7d41bc94728f42b39a65854d38b87.zip
base-files: uci-defaults: do config flush in one shot
Moving a file between tmpfs and other fs is neither faster nor safer, thus no point in doing it in two steps. Use new jshn option to write output directly to file. Originally discussed here: http://lists.openwrt.org/pipermail/openwrt-devel/2017-December/010127.html Signed-off-by: Roman Yeryomin <roman@advem.lv>
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/lib/functions/uci-defaults.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh
index c2c6dc3fdc..0d2dcd5241 100755
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -615,6 +615,5 @@ board_config_update() {
}
board_config_flush() {
- json_dump -i > /tmp/.board.json
- mv /tmp/.board.json ${CFG}
+ json_dump -i -o ${CFG}
}