1 |
On Sun, 26 May 2013 12:12:49 +0200 |
2 |
Robert David <robert.david.public@×××××.com> wrote: |
3 |
|
4 |
> On Sun, 26 May 2013 05:49:48 -0400 |
5 |
> Rich Freeman <rich0@g.o> wrote: |
6 |
> |
7 |
> > On Sun, May 26, 2013 at 4:32 AM, Ben de Groot <yngwin@g.o> |
8 |
> > wrote: |
9 |
> > > On 26 May 2013 15:37, Michał Górny <mgorny@g.o> wrote: |
10 |
> > >> |
11 |
> > >> Considering the design of OpenRC itself, it wouldn't be *that |
12 |
> > >> hard*. Actually, a method similar to one used in oldnet would |
13 |
> > >> simply work. That is, symlinking init.d files to a common |
14 |
> > >> 'systemd-wrapper' executable which would parse the unit files. |
15 |
> > > |
16 |
> > > I think this idea actually makes sense. Re-using upstream work |
17 |
> > > seems a logical idea, and could ease maintenance. Of course the |
18 |
> > > issue is whether the OpenRC devs see any benefit in this. |
19 |
> > |
20 |
> > Init.d scripts are just shell scripts. All somebody needs to do is |
21 |
> > write a shell script that parses a unit file and does what it says, |
22 |
> > and exports an openrc-oriented init.d environment. That can be |
23 |
> > packaged separately, or whatever, and maybe an eclass could make it |
24 |
> > easy to install (point it at the upstream/filesdir unit and tell it |
25 |
> > what to call the init.d script, and you get the appropriate |
26 |
> > symlink/script). |
27 |
> > |
28 |
> > The OpenRC devs don't have to endorse anything - sure it would make |
29 |
> > sense to bundle it, but it could just as easily be pulled in as a dep |
30 |
> > or used manually by a user. |
31 |
> > |
32 |
> > The script could ignore any unit features that aren't implemented. |
33 |
> > You can ignore settings like auto-restart/inetd and just use the |
34 |
> > settings that get the daemon started. |
35 |
> |
36 |
> +1 |
37 |
> |
38 |
> I would rather add shell script to parse unit and generate appropriate |
39 |
> init script while building than have initscript wrapper that will call |
40 |
> and parse on execution. As you said, some eclass. |
41 |
|
42 |
This effectively duplicates data for no real benefit. |
43 |
|
44 |
1) we waste disk space. |
45 |
|
46 |
2) if user modifies init.d script, systemd unit is out-of-sync. |
47 |
And the init.d is rewritten (potentially with CONFIG_PROTECT) on next |
48 |
upgrade. |
49 |
|
50 |
3) if user modifies systemd unit, init.d script is out-of-sync. |
51 |
|
52 |
-- |
53 |
Best regards, |
54 |
Michał Górny |