Red Hat Bugzilla – Bug 27173
shutdown(8) always removes /etc/nologin
Last modified: 2014-03-16 22:18:58 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i686)
According to the man page for shutdown(8), shutdown removes the
/etc/nologin file only if it's stopped before it can signal init.
This isn't true; it actually always removes the file.
Steps to Reproduce:
1. touch /etc/nologin
2. shutdown -r now
3. ls -l /etc/nologin
Actual Results: The /etc/nologin file does not exist.
Expected Results: The man page seems to suggest that /etc/nologin needs to
be removed by shutdown/startup scripts; since it's not, it should still
AIX does remove /etc/nologin on reboot and other Unix-clones may as well;
it may be best to change the man page, not shutdown, to maintain the
expected Red Hat Linux behavior.
Quote from shutdown(8):
If shutdown is called with a delay, it creates the advi-
sory file /etc/nologin which causes programs such as
login(1) to not allow new user logins. Shutdown only
removes this file if it is stopped before it can signal
init (i.e. it is cancelled or something goes wrong). Oth-
erwise it is the responsibility of the system shutdown or
startup scripts to remove this file so that users can
[22 June 1998]
Quote from /usr/share/doc/SysVInit-2.78/changelog:
> sysvinit (2.76-4) unstable; urgency=low
> * Shutdown now removes nologin file just before calling telinit
[8 May 1999]
Changelog is correct; the shutdown() function in shutdown.c has an
unlink(NOLOGIN) immediately before the execv(INIT, args).
Fixed in 2.78-15; thanks!