[Pkg-sysvinit-devel] Bug#635473: Finalizing /run transition manually seems to have worked

Roger Leigh rleigh at codelibre.net
Sun Sep 18 18:57:59 UTC 2011


On Sun, Sep 18, 2011 at 08:31:42PM +0200, Helge Kreutzmann wrote:
> Hello Roger,
> On Sun, Sep 18, 2011 at 07:00:36PM +0100, Roger Leigh wrote:
> > On Sun, Sep 18, 2011 at 06:46:26PM +0200, Helge Kreutzmann wrote:
> > For some reason I was never notified when this got reassigned to
> > sysvinit.  Possibly I missed it--less than two weeks until I have
> > to submit my PhD thesis, so I've been somewhat preoccupied over the
> > last few weeks!
> 
> No problem. Then I wish you all the luck that you PhD turns out fine,
> I very well remember mine, the last phase was hot. Do you need to
> defend it?

Thanks!  Yes, I'll have a viva voce examination sometime after I've
submitted it.

> > Regarding the /run vs /var/run symlinks: if the initscripts postinst
> > thinks you're inside a chroot, it will link /run to /var/run rather
> > than the other way around.  There are a few reasons for this, it's
> > mainly to do with initscripts not being run inside chroots which
> > means the transition wouldn't complete if we did things the
> > "correct" way around.  This would be why it went wrong in your
> > case.
> 
> Probably, as the installation happend probably within d-i, i.e. a
> chroot. If you need / want to debug this, I can dig up all logs I
> have.

I'm fairly sure this has been fixed for a couple of months at
least.  Unless it's reproducible with a current d-i image, I'm
fairly certain we've fixed it.

(There also won't be any logs really worth looking at I'm afraid;
it's all down to a single conditional in the initscripts postinst.
Which is skipped entirely if /run already exists, which is what
happens when base-files provides it during initial install after
it was fixed.)

> > using virtualisation stuff like vservers or the like, everything
> > should work correctly.  I'm not sure about the specifics of your
> > installation, but if it was a recent install, it could have
> > happened then, or if you were using virtualisation.
> 
> The former, and I only noticed it when anacron / cron insisted on not
> running. I don't know, probably automic fixing this is impossible,
> maybe some kind of check could be added, so people with the wrong link
> are at least notified?

The problem here is that both are correct--in different circumstances--
and it's very difficult to know after the fact that it's "wrong", so
you are correct that fixing it is hard.  In fact, automated switching
can't be done during an upgrade due to in-use files etc., which is
why initscripts does it early during boot and why it can't be done in
a chroot.

We could possibly check if /run is a symlink *and* we're not in a chroot
during bootup and print a warning if present.  But it will need some
careful consideration--e.g. it might legitimitely be this way on e.g.
GNU/Hurd, and it's not really "wrong" to manually configure it this way
on Linux, either.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.





More information about the Pkg-sysvinit-devel mailing list