You are not logged in.
Pages: 1
xen services seem a bit tricky to set up as it does some setting up and then runs 3 daemons.
If the OS is not running under the Xen hypervisor, then the SysV init script exits.
When I try and do this under Runit, the run script exits, looping once a second.
Can I get Runit to run the old SysV init script?
The man page says :-
The sv program can be sym-linked to /etc/init.d/ to provide an LSB init script interface. The service to be controlled then is specified by the base name of the ‘‘init script’’.
I don't know how to interpret that, so I'll tried this :-
cd /etc/service
ln -s /usr/bin/sv xen
ls -alF xen
lrwxrwxrwx 1 root root 11 Mar 22 10:32 xen -> /usr/bin/sv*
and the xen script exists in /etc/init.d
ls -alF /etc/init.d/xen
-rwxr-xr-x 1 root root 7929 Jul 10 2021 /etc/init.d/xen*
Test to see if it works :-
sv status xen
fail: xen: unable to change to service directory: not a directory
So, no, that is not the way to do it and it may well be that this would never do what I was after,
but I really don't understand the man page bit about sym-linking to /etc/init.d. Does anyone?
Offline
never used xen, so not sure i understand correctly, is there a xen runscript available that is not working?
if you want to use the sysv script maybe this helps : https://salsa.debian.org/runit-team/run … ian/README
* readme mentions how to switch from sysv script first then how to switch back.. you probably want the latter (?)
2c
Offline
OK, thank you for that link. I think it is saying that Runit still requires a proper Runit setup for the service, but you can have it controlled as though it were a SysV init script.
I have not found a Runit setup for xen and have been trying to convert the SysV init script into a Runit run script. To stop it looping I have added
sv once xen
which has the desired effect of stopping the looping when it is not booted on Xen, but more testing is required ;-)
Geoff
Offline
I have now got a run script working for Xen and will report separately.
The use of sym-linking sv, taken from the link xinomilo gave above, seems to be as follows, assuming you have the foo daemon (food) working via a Runit run file :-
/etc/init.d/food stop
dpkg-divert --add /etc/init.d/food
mv /etc/init.d/food /etc/init.d/food.distrib &&
ln -s /usr/bin/sv /etc/init.d/food
update-service --add /etc/sv/food
you can then use either of the following styles of command :-
sv status food
or
/etc/init.d/food status
to access the foo service under Runit.
Geoff
Offline
Pages: 1