Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Reusing systemd unit file format / forking systemd (was: Going against co-maintainer's wishes (ref. bug 412697))
Date: Sun, 26 May 2013 09:49:55
Message-Id: CAGfcS_m8zLM9mwkHdvchLZ8uMMrJSza4K1qAiHE691qjyh4eVA@mail.gmail.com
In Reply to: Re: [gentoo-dev] Reusing systemd unit file format / forking systemd (was: Going against co-maintainer's wishes (ref. bug 412697)) by Ben de Groot
1 On Sun, May 26, 2013 at 4:32 AM, Ben de Groot <yngwin@g.o> wrote:
2 > On 26 May 2013 15:37, Michał Górny <mgorny@g.o> wrote:
3 >>
4 >> Considering the design of OpenRC itself, it wouldn't be *that hard*.
5 >> Actually, a method similar to one used in oldnet would simply work.
6 >> That is, symlinking init.d files to a common 'systemd-wrapper'
7 >> executable which would parse the unit files.
8 >
9 > I think this idea actually makes sense. Re-using upstream work seems a
10 > logical idea, and could ease maintenance. Of course the issue is
11 > whether the OpenRC devs see any benefit in this.
12
13 Init.d scripts are just shell scripts. All somebody needs to do is
14 write a shell script that parses a unit file and does what it says,
15 and exports an openrc-oriented init.d environment. That can be
16 packaged separately, or whatever, and maybe an eclass could make it
17 easy to install (point it at the upstream/filesdir unit and tell it
18 what to call the init.d script, and you get the appropriate
19 symlink/script).
20
21 The OpenRC devs don't have to endorse anything - sure it would make
22 sense to bundle it, but it could just as easily be pulled in as a dep
23 or used manually by a user.
24
25 The script could ignore any unit features that aren't implemented.
26 You can ignore settings like auto-restart/inetd and just use the
27 settings that get the daemon started.
28
29 Rich

Replies