Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Making systemd more accessible to "normal" users
Date: Sun, 05 May 2013 11:58:20
Message-Id: pan$81b72$1737c530$4a48a40f$ff7897b4@cox.net
In Reply to: Re: [gentoo-dev] Making systemd more accessible to "normal" users by Rich Freeman
1 Rich Freeman posted on Sat, 04 May 2013 08:54:16 -0400 as excerpted:
2
3 > On Sat, May 4, 2013 at 6:42 AM, Luca Barbato <lu_zero@g.o> wrote:
4 >> Hopefully we might have a gsoc student volunteering to make a
5 >> runscript/lsb-script/systemd-unit compiler and a small abstraction so
6 >> we write a single init.d script and generate what's needed.
7 >> Probably we might even support pure-runit that way with minimal effort.
8 >>
9 > I'm skeptical that this will ever make sense - both init systems have
10 > features that it would make sense for units/scripts to make use of in a
11 > more tailored fashion.
12
13 Same here. Sure, an automated conversion is possible and arguably might
14 serve as a starting point, but you're losing the best of both initsystems
15 in the process.
16
17 > That said, if you really wanted to inter-convert, my gut feeling is that
18 > it would be easier to go from a systemd unit to an init.d script, and
19 > not the other way around. A systemd unit is more like a specification -
20 > it describes the end result of what systemd should do.
21 > An init.d script is an executable program
22
23 You're a bit behind on openrc features, I think. =:^) It's actually
24 quite possible for openrc/runscript "scripts" to be written in a "spec-
25 style" format similar to systemd's unit files, just as it's possible for
26 systemd to run "legacy" shell-style scripts with little or no
27 modification, as some distros did with their initial conversion,
28 according to what I've read.
29
30 I think there's even some in-tree examples, tho I'm too lazy to go
31 looking ATM and their package maintainers and/or williamh would be more
32 familiar with them and could probably point them out off the top of their
33 head without looking.
34
35 > The reality is that systemd units are floating around all over the place
36 > - when I installed it on a Gentoo box I ended up just Googling for
37 > already-written units for daemons that lacked them in Gentoo and tweaked
38 > them.
39
40 That's what I have always figured I'd do, if I were to decide to convert
41 here before all the packages I init here had in-tree unit-files.
42
43 > Systemd units are much easier to write (typically) than init.d scripts
44 > so this could be an area where end-users could contribute.
45
46 See above. In theory it should be about even either way, since both
47 systemd and openrc can do either scripted or spec-style "units".
48 However, I expect systemd's "google resource" to be deeper in this
49 regard, both with regard to the units themselves and to documentation
50 about them, and the experience quotient probably favors systemd as well,
51 so in practice you're almost certainly right, if only from the previous
52 experience and googlable documentation and samples perspective.
53
54 --
55 Duncan - List replies preferred. No HTML msgs.
56 "Every nonfree program has a lord, a master --
57 and if you use the program, he is your master." Richard Stallman