Gian Piero Carrubba wrote: > In the last debian releases /etc/nologin is just a symlink to > /var/lib/initscripts/nologin, so it should exist for regular behaviour > of the nologin feature. IMHO, a better default is to include it in the > repository so to recreate it if needed.
The state of /etc/nologin is sorta confusing: * nologin(5) still claims that /etc/nologin is the flag file whose existance controls nologin, not mentioning that it´s a symlink to a file that may not exist. rcS(5) does mention that, but it's not the place many people will look. * /etc/init.d/rmnologin still has comments indicating it removes /etc/nologin, even though it doesn't, instead removing the file in /var. * Of all the systems running sid I surveyed, none currently had a /etc/nologin file or symlink. This includes one that was cleanly installed less than a month ago. * initscript's postinst creates the /etc/nologin symlink on initial install, and on upgrade. * shutdown unlinks /etc/nologin. The easiest way to see this happen is to run shutdown -k now. In other circumstances, it will open /etc/nologin for write. This can remove the symlink and replace it with the file. * As a test I reinstalled initscripts, letting it recreate the symlink. Then I rebooted. /etc/nologin was gone again. I'n not 100% sure what does the deed, but I suspect it's shutdown(8). So, from the POV of etckeeper, if it tracks /etc/nologin in revision control, the file will be constantly removed, deleted, change from a symlink to a regular file, etc. Lots of noise. Also, etckeeper doesn't really guarantee it preserves every file in /etc that the system needs for operation. Other noisy yet possibly essential gunk like /etc/blkid.tab, /etc/ld.so.cache, etc is also ignored. If /etc/nologin were a stable symlink as (parts of) the system seem to intend it to be, I'd agree with you, Gian. From the POV of Debian system coherency and comprehensability, /etc/nologin seems to be a mess that someone should perhaps finish cleaning up? -- see shy jo
signature.asc
Description: Digital signature

