Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Making systemd more accessible to "normal" users
Date: Sat, 04 May 2013 12:54:25
Message-Id: CAGfcS_kUR0f2CA-1nPf7K6y87+qUsSTcqEek0G5F9VMSNkEN+Q@mail.gmail.com
In Reply to: Re: [gentoo-dev] Making systemd more accessible to "normal" users by Luca Barbato
1 On Sat, May 4, 2013 at 6:42 AM, Luca Barbato <lu_zero@g.o> wrote:
2 > Hopefully we might have a gsoc student volunteering to make a
3 > runscript/lsb-script/systemd-unit compiler and a small abstraction so we
4 > write a single init.d script and generate what's needed.
5 > Probably we might even support pure-runit that way with minimal effort.
6 >
7
8 I'm skeptical that this will ever make sense - both init systems have
9 features that it would make sense for units/scripts to make use of in
10 a more tailored fashion.
11
12 That said, if you really wanted to inter-convert, my gut feeling is
13 that it would be easier to go from a systemd unit to an init.d script,
14 and not the other way around. A systemd unit is more like a
15 specification - it describes the end result of what systemd should do.
16 An init.d script is an executable program - it can do virtually
17 anything even if they usually start out with a common skeleton. I
18 guess you could run the thing in a sandbox and carefully capture what
19 happens, and look in particular for calls to start-stop-daemon and
20 such, but it would be tricky.
21
22 The reality is that systemd units are floating around all over the
23 place - when I installed it on a Gentoo box I ended up just Googling
24 for already-written units for daemons that lacked them in Gentoo and
25 tweaked them. All that really need to happen is for those who use
26 systemd to submit them as bug attachments and maintainers should
27 commit them. Maybe a quick guide should be tossed together suggesting
28 the best way to install them (they're just text files in the proper
29 directory, but perhaps an eclass exists to take care of this).
30 Systemd units are much easier to write (typically) than init.d scripts
31 so this could be an area where end-users could contribute.
32
33 Rich

Replies

Subject Author
[gentoo-dev] Re: Making systemd more accessible to "normal" users Duncan <1i5t5.duncan@×××.net>