openwrt/package/base-files/files/lib/preinit
Oliver Sedlbauer 49a0acb12c
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
base-files: avoid rm error messages in failsafe_wait
The fs_wait_for_key function runs multiple background processes that all
try to delete the same temporary file ($keypress_wait) when they exit.
This creates a race condition where one process successfully deletes the
file while others fail with ENOENT.

Busybox rm only suppresses "file not found" errors during the initial lstat()
check, not during the actual unlink() call. This causes error messages in the
boot log even with rm -f:

  rm: can't remove '/tmp/tmp.hKjPDH': No such file or directory

Fixed by redirecting stderr to /dev/null for rm calls in concurrent contexts.
This change does not affect functionality and only avoids confusing log
output during boot.

Signed-off-by: Oliver Sedlbauer <os@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/22079
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-03-04 12:54:16 +01:00
..
02_default_set_state treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
02_sysinfo treewide: populate boardname and model earlier 2017-07-15 23:13:34 +02:00
10_indicate_failsafe failsafe: fix console failsafe shell 2024-08-19 18:55:00 +02:00
10_indicate_preinit base-files: add ucidef_set_network_device_path_port function 2024-10-19 19:10:56 +02:00
30_failsafe_wait base-files: avoid rm error messages in failsafe_wait 2026-03-04 12:54:16 +01:00
40_run_failsafe_hook treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
50_indicate_regular_preinit treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
70_initramfs_test treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
80_mount_root base-files: fix merge of passwd/shadow/group lines with trailing colons 2024-08-29 21:07:15 +02:00
99_10_failsafe_login failsafe: fix console failsafe shell 2024-08-19 18:55:00 +02:00
99_10_run_init treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00