1 |
On Sun, 14 Feb 2016 13:10:07 +0100 Patrick Lauer wrote: |
2 |
|
3 |
>On 02/09/2016 01:17 PM, Rich Freeman wrote: |
4 |
>> On Tue, Feb 9, 2016 at 3:43 AM, Kent Fredric <kentfredric@×××××.com> |
5 |
>> wrote: |
6 |
>>> And a lot of Gentoo is surprisingly simple: Like our use of bash |
7 |
>>> scripts for recipies to build things, like using rsync to |
8 |
>>> deploy/relay not just those recipies, but security notices and |
9 |
>>> news items, which are themselves reasonably simple formats. |
10 |
>> Well, one thing about Gentoo that certainly isn't simple is our |
11 |
>> init.d scripts. |
12 |
>> |
13 |
>> Compare this: |
14 |
>> http://pastebin.com/sSDtpF4t |
15 |
>More stable link: |
16 |
>https://gitweb.gentoo.org/proj/apache.git/tree/2.4/init/apache2.initd |
17 |
>> |
18 |
>> With this: |
19 |
>> http://pastebin.com/Lfn8r7qP |
20 |
>More stable link: |
21 |
>https://gitweb.gentoo.org/repo/gentoo.git/tree/www-servers/apache/files/apache2.2.service |
22 |
>> Systemd does the job in 10% of the code (and half of it is a |
23 |
>> comment), and doesn't implement its own service polling and killer |
24 |
>> script during shutdown independently for every service (not that |
25 |
>> every init.d script even does this - most of them will just leave |
26 |
>> orphans behind, and systemd will catch orphans that even the lengthy |
27 |
>> init.d script for apache misses). |
28 |
>> |
29 |
>Right, that's a bad comparison. |
30 |
> |
31 |
>The equivalent OpenRC init script is: |
32 |
> |
33 |
>``` |
34 |
>#!/sbin/runscript |
35 |
>command="/usr/sbin/apache2" |
36 |
>command_args="${APACHE2_OPTS}" |
37 |
>description_reload="A graceful restart advises the children to exit |
38 |
>after the current request and reloads the configuration." |
39 |
> |
40 |
>stop() { |
41 |
> $command $APACHE2_OPTS -k graceful-stop |
42 |
>} |
43 |
>reload() { |
44 |
> $command $APACHE2_OPTS -k graceful |
45 |
>} |
46 |
>``` |
47 |
>So that's almost exactly the same (modulo braces and newlines). There's |
48 |
>no equivalent for PrivateTmp, and we ignore the extra data in |
49 |
>/etc/tmpfiles.d (for creating runtime dirs). Which is bad, but that's |
50 |
>another rant ;) |
51 |
> |
52 |
>Just that the current initscript does a lot more, and ... uhm ... why |
53 |
>is the systemd unit sourcing /etc/conf.d/apache2 ? |
54 |
|
55 |
Becasue I don't give a damn about systemd and nobody cared to send |
56 |
patches yet. |
57 |
|
58 |
>(Oh, and dependencies, but those just slow down startup <trollface/>) |
59 |
> |
60 |
>So if you compile the equivalent naive init script there's not much |
61 |
>difference, and the initial argument falls on its face and disappears. |
62 |
> |
63 |
>I'm getting tired of having this argument :) |
64 |
> |
65 |
|
66 |
-- |
67 |
Lars Wendler |
68 |
Gentoo package maintainer |
69 |
GPG: 21CC CF02 4586 0A07 ED93 9F68 498F E765 960E 9B39 |
70 |
|
71 |
Attention! New gpg key! See (self signed server cert for now) |
72 |
http://www.gentoofan.org/blog/index.php?/archives/9-New-gpg-keys.html |