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

Robert Millan rmh at debian.org
Sun Jan 8 15:56:57 UTC 2012


El 8 de gener de 2012 16:47, Roger Leigh <rleigh at codelibre.net> ha escrit:
> No, 2) is replacing with a symlink, while 6) is removing the
> now unneeded symlink.  I noticed that if you mv /dev/initctl
> /dev/initctl.old, init (I presume) immediately recreates
> /dev/initctl.
>
> The following sequence appears to work:
>
> # New control channel
> mkfifo /run/initctl
> # Symlink to new channel
> ln -s /run/initctl /dev/initctl.new
> # Replace existing channel with symlink
> mv /dev/initctl.new /dev/initctl
> # Reopen control channel (now /run/initctl)
> kill -SIGUSR1 1
> # Replace init with new version using new paths
> init u
> # Delete old path
> [rm /run/initctl]
>
> If /dev/initctl is not open or is invalid, "init u" exits with
> an error, so we can loop on this in the postinst to wait until
> it's reopened.  It's pretty quick though, so perhaps loop a
> fixed number of times and then continue with a warning if not
> possible, especially since it's not fatal?

Sounds good.  Btw, please remember not to hardcode /dev/initctl since
the old path is kernel-specific.

-- 
Robert Millan





More information about the Pkg-sysvinit-devel mailing list