[Pkg-sysvinit-devel] Bug#638019: /run/initctl

Roger Leigh rleigh at codelibre.net
Sun Jan 8 13:15:53 UTC 2012


On Sun, Jan 08, 2012 at 01:51:03PM +0100, Robert Millan wrote:
> Hi Roger,
> 
> Thanks for looking at this.
> 
> El 8 de gener de 2012 12:22, Roger Leigh <rleigh at debian.org> ha escrit:
> > How about on upgrade we symlink /run/initctl → /dev/initctl if
> > /run/initctl does not exist?
> > Programs can therefore be switched to using /run/initctl immediately.
> 
> This seems fine, however...
> 
> > On reboot, we can then just create /run/initctl and everything
> > should just work.
> 
> ...you need to be more specific about what "on reboot" means.
> /sbin/init will open /run/initctl very early.  If at that time
> /run/initctl is a symlink, it's no good replacing it with a real fifo
> afterwards (we get in the same situation we were before reboot).
> 
> Or are you proposing that /sbin/init itself removes the symlink and
> creates a new fifo before opening it?
> 
> Btw, your patch doesn't do what you described.  Did you attach what
> you intended?

I thought about it a bit more, and the symlink is not needed.
If we create /run/initctl and re-exec init, it will then open the
new pipe.  We can then delete the old one and the process is
complete.  This can be done entirely within the postinst, and is
what the attached patch does.

I assume /sbin/init creates /run/initctl at startup if it doesn't
already exist?  If not, we might need to create it in the initramfs
and/or after startup in a similar manner to the existing handling
of /dev/initctl.  Not checked this--I'll have to look into it a bit
more.


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