sm: remove /run/nologin when leaving runlevel S

On a system with systemd's tmpfiles.d files installed, only root can
log in after boot.  The files have a boot-only entry:

    f+! /run/nologin 0644 - - - "System is booting up. ..."

On systemd the file is removed by systemd-user-sessions when boot is
done.  Finit runs the entry, but only removes /etc/nologin, so
pam_nologin keeps refusing everyone but root.

Remove /run/nologin too when leaving runlevel S.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-21 17:13:52 +01:00
1 parent a4a518d970
commit 64e299bedc
3 files changed
+21

No files matched your search

+4
View File
@@ -315,6 +315,10 @@ All relevant changes are documented in this file.
- Fix age `0` in a tmpfiles entry, it was read as no age. As in
tmpfiles.d(5), `tmpfiles --clean` now empties the directory of such an
entry
- Fix logins refused after boot on a system with systemd's tmpfiles.d
files installed. They create `/run/nologin` at boot, and on systemd it
is removed by systemd-user-sessions. Finit now removes it when leaving
runlevel S, like it already does with `/etc/nologin`
- Fix a lost reload for a service paused mid-reload by a condition in
flux. A second reload arriving meanwhile re-parsed the unchanged .conf
and cleared the pending mark, so the service resumed without ever being