Bug 27173 - shutdown(8) always removes /etc/nologin
Summary: shutdown(8) always removes /etc/nologin
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: SysVinit   
(Show other bugs)
Version: 7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-02-12 17:56 UTC by Steve Bonneville
Modified: 2014-03-17 02:18 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-12 17:56:46 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Steve Bonneville 2001-02-12 17:56:43 UTC
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.

Reproducible: Always
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
exist.  

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
       login.
  [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).

Comment 1 Bill Nottingham 2001-04-04 05:55:09 UTC
Fixed in 2.78-15; thanks!


Note You need to log in before you can comment on or make changes to this bug.