openwrt-mirror/package/base-files
Andreas Gnau 26ba9b609b base-files: board_detect: make resilient against power-cuts
If board_detect is interrupted by cutting power on first boot,
board.json might only be half-way written and the file will not be
written again correctly on subsequent boots.

Write to a temporary file first, then rename. Since a rename on the same
file system is an atomic operation, it ensures that either
/etc/board.json does not exist or that the complete file exists.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/20831
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-25 21:51:25 +01:00
..
files base-files: board_detect: make resilient against power-cuts 2025-11-25 21:51:25 +01:00
image-config.in config: add VERSION_FIRMWARE_URL 2025-01-30 19:25:37 +01:00
Makefile build: lock versions for special APK packages 2025-02-04 13:48:59 +00:00