Package: runit
Version: 2.1.2-59

I have a long standing installation of runit which does not use the
runsvchdir(8) symlink flipping mechanics.  /etc/service is a normal
directory.  This isn't some customization I did, this is simply the
natural state of my sid host after years of following sid.
/etc/runit/runsvdir/current does exist, and is a symlink to the
svmanaged directory which is empty.  The preinst script that attempts
to migrate away from this layout fails because it sets errexit (-e)
and readlink returns non-zero.

Checking if "$servlink" != '/etc/runit/runsvdir/current' is never
reached.

Newer installations won't have this problem, they get set up with the
symlink nest that the runit-init stuff uses, but as it stands, older
installs can't upgrade.  Obviously migrating /etc/service to a symlink
is delicate, I was able to get away with:

T=`mktemp -d /etc/runit.XXXXXXXX`
ln -s /etc/runit/runsvdir/current "$T/service"
rmdir /etc/runit/runsvdir/svmanaged
mv /etc/service /etc/runit/runsvdir/svmanaged
mv -T "$T/service" /etc/service
rmdir "$T"

but I can't say that will work flawlessly for everybody.  I use
sysvinit and my inittab entry is:

SV:123456:respawn:/etc/runit/2

I tried the same fix on a old guest I had running systemd and it
worked there too, FWIW.

-- 
Jamie Heilman                     http://audible.transient.net/~jamie/

Reply via email to