Oliver Sedlbauer 49a0acb12c
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
..