[LEDE-DEV] [PATCH] base-files: uci-defaults: do config flush in one shot

Roman Yeryomin roman at advem.lv
Fri Dec 1 15:26:48 PST 2017


Moving a file between tmpfs and other fs is neither
faster nor safer, thus no point in doing it in two steps.

Signed-off-by: Roman Yeryomin <roman at advem.lv>
---
 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 0cd519a147..8eab5ac1e1 100755
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -633,6 +633,5 @@ board_config_update() {
 }
 
 board_config_flush() {
-	json_dump -i > /tmp/.board.json
-	mv /tmp/.board.json ${CFG}
+	json_dump -i > ${CFG}
 }
-- 
2.14.1




More information about the Lede-dev mailing list