[Pkg-sysvinit-devel] Bug#638019: /run/initctl
Roger Leigh
rleigh at codelibre.net
Sun Jan 8 15:20:28 UTC 2012
On Sun, Jan 08, 2012 at 03:34:13PM +0100, Robert Millan wrote:
> El 8 de gener de 2012 15:14, Roger Leigh <rleigh at codelibre.net> ha escrit:
> > path, "init u" on its own won't work. I would suggest this strategy:
> >
> > 1) Create /run/initctl
> > 2) Symlink /dev/initctl (or /etc/.initctl) to /run/initctl
> > 3) Send SIGUSR1 to init
> > → init reopens using the old path, but is redirected to use
> > /run/initctl
> > 4) Wait for that action to complete
> > 5) Run "init q" to re-exec init. The new init will use the new
> > paths
> > 6) Delete the no-longer-needed /dev/initctl (or /etc/.initctl).
>
> Seems good, but I dislike step 4, as it opens the door for race conditions.
>
> Can't we just remove steps 4 and 5? I think everything would work without
> them.
If we don't do that, then we are left running the old /sbin/init binary,
which is an important part of the upgrade. If there's a way to detect
a listener on a pipe, we could do that. Or if telinit/init return an
error code, we can loop until it succeeds.
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