Gentoo Archives: gentoo-user

From: Grant Edwards <grant.b.edwards@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] sysV/openrc init script vs. systemd .service file
Date: Mon, 11 Aug 2014 20:05:59
Message-Id: lsb7m3$v36$
1 I maintain some out-of-tree Linux device drivers that have been around
2 for yonks and ship with system V init scripts. There's an install
3 script (or Makefile recipe) that attempts attempts to figure out where
4 to put an init script and set up symlinks as appropriate.
6 It's not perfect, but so far it has worked good enough. It doesn't
7 work great with openrc [e.g. doesn't enable the init script
8 automatically], but people seem to be able to figure it out.
10 Now I've got a customer that runs systemd and reports that the init
11 script "doesn't work" for some undefined value of "doesn't work".
13 I've pretty much always been a system V init guy and have only
14 grumblingly adapted to openrc. [Insert crotchety old Unix guy
15 ramblings here... blah blah version 7... PDP-11 blah DECwriter blah
16 silent 700 blah blah ASR-33... kids these days... ad naseam.]
18 Needless to say: I find systemd distasteful, but I've got customers
19 who use it. So...
21 I keep reading that systemd is "compatible with system V init
22 scripts", but documentation on how that works seems to be somewhat
23 lacking and/or wrong. e.g. The upstream docs refer to using
24 /sbin/system to run old-style init scripts found in /etc/init.d, but
25 neither /sbin/system nor the /etc/init.d directory seem to exsit on
26 the systemd machine that I'm testing with. I'm currently testing with
27 Arch Linux, but I'm also going to set up a Gentoo/systemd system.
29 I've also seen recommendations that one would be better off just doing
30 it the right way and writing a systemd .service file.
32 Any advice on whether it would be easier to use a common init script
33 with sysV/OpenRC/systemd or to write a separate .service file?
35 --
36 Grant Edwards grant.b.edwards Yow! Where's the Coke
37 at machine? Tell me a joke!!