From 940844e077d7d41bc94728f42b39a65854d38b87 Mon Sep 17 00:00:00 2001 From: Roman Yeryomin Date: Tue, 22 Oct 2019 00:10:20 +0300 Subject: [PATCH] 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 --- package/base-files/files/lib/functions/uci-defaults.sh | 3 +-- 1 file changed, 1 insertion(+), 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} } -- 2.30.2