Re: How to check for other init systems from sysvinit script
On Thu, May 30, 2013 at 10:39:55PM +0200, Ondřej Surý wrote:
> Practical question: if I were to support systemd .service, upstart
> init job and/or OpenRC <whatever> together with standard sysvinit
> script, how do I check for currently used init system from sysvinit
> script to not start the service for a second time?
. /lib/lsb/init-functions
(Which should be near the top of your init script already.)
This will automagically invoke systemd or upstart if appropriate.
If I understand correctly, OpenRC doesn't require init to directly
start services, so on an OpenRC system your script should run in
the same way it does now.
> Is there some material on wiki.d.o I can use (and if not can
> somebody prepare it)?
What is there to write?
Ben.
--
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus
Reply to: