[Pkg-sysvinit-devel] Bug#660862: initscripts: symlink /etc/nologin points to non existent file:

Roger Leigh rleigh at codelibre.net
Fri Nov 23 22:26:36 UTC 2012


tags 660862 + patch pending
thanks

On Fri, Nov 23, 2012 at 10:11:03PM +0000, Roger Leigh wrote:
> On Fri, Nov 23, 2012 at 10:05:07PM +0000, Roger Leigh wrote:
> > On Fri, Nov 23, 2012 at 03:49:15PM +0100, Carlos Alberto Lopez Perez wrote:
> > > Such symlink was created by an upgrade of the package initscripts on a system running Debian/Squeeze.
> > > 
> > > 
> > > Here is the relevant part:
> > > 
> > > 
> > > $ grep -C3 /etc/nologin sysvinit-2.88dsf/debian/initscripts.postinst
> > > # Set up nologin symlink so that dynamic-login-disabling will work
> > > # (when DELAYLOGIN is set to "yes")
> > > #
> > > if [ ! -L /etc/nologin ] && [ ! -e /etc/nologin ]
> > > then
> > > 	rm -f /var/lib/initscripts/nologin
> > > 	ln -s /var/lib/initscripts/nologin /etc/nologin
> > > fi
> > > 
> > > I don't know why the postinst script does that.  Can somebody explain?
> > 
> > Looking at the history in git, this was done for the migration
> > of /etc/nologin to /var/lib/initscripts/nologin; I presume at
> > least.  It would have been nicer to have a version check here.
> > 
> > Unless there's a reason for keeping it (and I can't see one
> > with a short investigation), I think this logic may be safely
> > removed.  It might be a bit late to do this for wheezy, but
> > definitely fixable for jessie.
> 
> Looking at this a bit more closely, this should probably be moved
> to /run/nologin, since it's the last writable filesystem and unlike
> /etc and /var/lib/initscripts, will be present and writable until
> the system is halted.  shutdown(8) also hardcodes /etc/nologin, and
> this should also be switched to use /run/nologin.

I have applied the following patch to the jessie-pending git branch.
This will mean it will go into jessie after the wheezy release.  For
the meantime it's just queued.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debian-Use-run-nologin-and-close-660862.patch
Type: text/x-diff
Size: 6431 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20121123/dde45f1d/attachment-0001.patch>


More information about the Pkg-sysvinit-devel mailing list