From 9ea8535c299a161165da8ca45269a986be94527c Mon Sep 17 00:00:00 2001 From: "Artem (e-pirate) Illarionov" Date: Fri, 20 Feb 2026 15:01:47 +0300 Subject: [PATCH] Fix rc.log missing shutdown messages if located on separate (non-root) file system by preventing localmount from unmouting this file system to early keeping rc.log file writible. Closes: https://github.com/OpenRC/openrc/issues/977 --- init.d/localmount.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init.d/localmount.in b/init.d/localmount.in index b709fb2c7..3faa16010 100644 --- a/init.d/localmount.in +++ b/init.d/localmount.in @@ -69,6 +69,12 @@ stop() no_umounts_r="$no_umounts_r|$x" done + if yesno ${rc_logger:-NO}; then + [ ! -f "${rc_log_path}" ] && touch "${rc_log_path}" + local rc_log_mntpnt=$(stat --format %m "${rc_log_path}") + no_umounts_r="$no_umounts_r|${rc_log_mntpnt}" + fi + if [ "$RC_UNAME" = Linux ]; then no_umounts_r="$no_umounts_r|/proc|/proc/.*|/run|/sys|/sys/.*" if [ -e "$rc_svcdir"/usr_premounted ]; then