NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Removing /etc/nologin on shutdown



    Date:        Mon, 24 May 2010 16:09:21 -0500 (CDT)
    From:        "Jeremy C. Reed" <reed%reedmedia.net@localhost>
    Message-ID:  
<alpine.NEB.2.01.1005241604110.27426%t1.m.reedmedia.net@localhost>

  | I misunderstand. halt (or reboot) sends SIGTERM to -1. shutdown has a 
  | handler for that signal which does the finish() (remove the 
  | /etc/nologin). I may be reading this wrong.

Last time I checked, the kernel does not replace terminated executable in
order to call signal handlers they used to have installed - even if the
sa
  | 
  | > Most likely, shutdown should be removing /etc/nologin immediately before 
it
  | > exec's reboot (or halt) - that would leave a race condition (it would be
  | > possible for someone to log in in the very small gap between the unlink 
and
  | > when reboot (or halt) actually does its thing, but I doubt that's going to
  | > bother anyone very much.
  | 
  | Or halt/reboot can remove the file as another option.
  | 
  | > What should happen if the exec fails I will leave for someone else to
  | > ponder!
  | 




Home | Main Index | Thread Index | Old Index