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

Re: ifupdown writes to /etc... a bug?

This one time, at band camp, Goswin Brederlow wrote:
>There is one thing that realy breaks everything so far and thats
>"/etc/nologin". Changing it affects several packages so it needs a
>standard place to be moved to.
>I see three options:
>A. /etc/volatile.conf says where volatile data can be found, look
>there for a "nologin" file.
>B. symlink /etc/nologin on RO /. Patch software to check if
>/etc/nologin is a symlink and then check if it is dangling as check
>for nologin.
>C. move /etc/nologin and patch software to look at the new place.

Actually, I'm too quick on the send key.  shutdown creates /etc/nologin when
there's a delay before the halt or reboot.  Apologies for jumping the gun
with my previous mail.

So, I'd suggest the following:

1) Patch shutdown to write the file /var/run/nologin (unless someone can
suggest a better place for this)

2) Patch login to test for both /etc/nologin and /var/run/nologin.

This way the admin is free to create and remove /etc/nologin as they desire,
and shutdown can create the statefile as it desires.   It also means that
there's no transition needed, because the old behaviour is still supported
if the admin needs to prevent logins, but that the sanctity of /etc is

jaq@debian.org                               http://people.debian.org/~jaq

Reply to: