1 |
On Sun, 26 May 2013 12:31:25 +0200 |
2 |
Michał Górny <mgorny@g.o> wrote: |
3 |
|
4 |
> On Sun, 26 May 2013 12:12:49 +0200 |
5 |
> Robert David <robert.david.public@×××××.com> wrote: |
6 |
> |
7 |
> > On Sun, 26 May 2013 05:49:48 -0400 |
8 |
> > Rich Freeman <rich0@g.o> wrote: |
9 |
> > |
10 |
> > > On Sun, May 26, 2013 at 4:32 AM, Ben de Groot <yngwin@g.o> |
11 |
> > > wrote: |
12 |
> > > > On 26 May 2013 15:37, Michał Górny <mgorny@g.o> wrote: |
13 |
> > > >> |
14 |
> > > >> Considering the design of OpenRC itself, it wouldn't be *that |
15 |
> > > >> hard*. Actually, a method similar to one used in oldnet would |
16 |
> > > >> simply work. That is, symlinking init.d files to a common |
17 |
> > > >> 'systemd-wrapper' executable which would parse the unit files. |
18 |
> > > > |
19 |
> > > > I think this idea actually makes sense. Re-using upstream work |
20 |
> > > > seems a logical idea, and could ease maintenance. Of course the |
21 |
> > > > issue is whether the OpenRC devs see any benefit in this. |
22 |
> > > |
23 |
> > > Init.d scripts are just shell scripts. All somebody needs to do |
24 |
> > > is write a shell script that parses a unit file and does what it |
25 |
> > > says, and exports an openrc-oriented init.d environment. That |
26 |
> > > can be packaged separately, or whatever, and maybe an eclass |
27 |
> > > could make it easy to install (point it at the upstream/filesdir |
28 |
> > > unit and tell it what to call the init.d script, and you get the |
29 |
> > > appropriate symlink/script). |
30 |
> > > |
31 |
> > > The OpenRC devs don't have to endorse anything - sure it would |
32 |
> > > make sense to bundle it, but it could just as easily be pulled in |
33 |
> > > as a dep or used manually by a user. |
34 |
> > > |
35 |
> > > The script could ignore any unit features that aren't implemented. |
36 |
> > > You can ignore settings like auto-restart/inetd and just use the |
37 |
> > > settings that get the daemon started. |
38 |
> > |
39 |
> > +1 |
40 |
> > |
41 |
> > I would rather add shell script to parse unit and generate |
42 |
> > appropriate init script while building than have initscript wrapper |
43 |
> > that will call and parse on execution. As you said, some eclass. |
44 |
> |
45 |
> This effectively duplicates data for no real benefit. |
46 |
> |
47 |
> 1) we waste disk space. |
48 |
|
49 |
Come on, it is 2013, wasting few inodes. I did not got these problems |
50 |
in the old good times with my 386 with 4mb ram and few MB hdd. |
51 |
Those with embedded system will mask many other files, not only |
52 |
systemd units (so they save one inode more with my approach, when need |
53 |
no initscript-wrapper). |
54 |
Users of regular server/desktops/laptops, 10-20 inodes more? They would |
55 |
rather won't use Gentoo with its portage tree or do not compile |
56 |
kernel sources, etc. |
57 |
|
58 |
> |
59 |
> 2) if user modifies init.d script, systemd unit is out-of-sync. |
60 |
> And the init.d is rewritten (potentially with CONFIG_PROTECT) on next |
61 |
> upgrade. |
62 |
|
63 |
If someone update iniscript, must be prepared to be outofsync with |
64 |
package version. Thus CONFIG_PROTECT. |
65 |
|
66 |
> |
67 |
> 3) if user modifies systemd unit, init.d script is out-of-sync. |
68 |
> |
69 |
|
70 |
Why someone will modify systemd unit when will be using init.d |
71 |
scripts. And for those few people doing this, the same script as portage |
72 |
use for converting can be used. |
73 |
|
74 |
Robert. |