1 |
On Sunday 18 December 2016 00:36:15 Heiko Baums wrote: |
2 |
> Am 18.12.2016 um 00:23 schrieb Andrej Rode: |
3 |
> > For reference did you try to write an init script for a piece of |
4 |
> > software in SysVInit, systemd and OpenRC to be able to compare them? |
5 |
> |
6 |
> Yes, at least I had to read a lot of them. And init scripts are really a |
7 |
> lot easier to write and read than such a systemd service file, |
8 |
|
9 |
Personally, I find OpenRC scripts and systemd unit files comparable, at least |
10 |
in my limited experience with writing OpenRC init scripts. When people |
11 |
compare systemd unit files to init scripts, they usually mean *raw* (LSB?) |
12 |
sysvinit scripts (as IIUC Debian use{s,d}), with all of their ridiculous |
13 |
amounts of boilerplate. OpenRC-style scripts, if done the modern, declarative |
14 |
way (which I have), are also fairly easy to read and write. But then you're |
15 |
almost writing them like systemd units: mostly setting a bunch of variables |
16 |
that say *what* you want, not *how* you want it (you know, declarative), see |
17 |
openrc-run(8). |
18 |
|
19 |
(Of course OpenRC is not the only alternative, but I don't know enough about |
20 |
others to be able to comment on them.) |
21 |
|
22 |
> particularly you can separate the configuration to another file while |
23 |
> you need to copy the whole service file to another place in which it |
24 |
> won't be updated by the package manager if a new version would be released. |
25 |
|
26 |
That is incorrect, systemd allows for overriding files in |
27 |
/etc/systemd/system/${unit_name}.d/*.conf. Furthermore, service units can |
28 |
read environment variables from a file via EnvironmentFile. Although I'll |
29 |
grant you that AFAIK there's no convention for where place for them. |
30 |
|
31 |
I'm not convinced that you actually understand systemd particularly well. It |
32 |
seems to me that if you want to develop an informed opinion about it, you |
33 |
should: |
34 |
|
35 |
a) Read the official documentation (don't just rely on what others say; even |
36 |
when well-intentioned, people can say stupid things). |
37 |
|
38 |
b) Try to set up and/or run a systemd-based system, and seriously try to grok |
39 |
it. Only then will you be able to compare it to other init systems properly. |
40 |
|
41 |
I did a variation on (b) and migrated one of my systems to systemd, just so I |
42 |
could see what it was like. Up until then I had only read about how "anti- |
43 |
Unix" and "bloated" and "evil" etc. systemd was by one side, and how "super |
44 |
duper awesome" it was from another side, thus I was very cautious at first. |
45 |
Quite frankly, in retrospect I suspect that that divide in opinion is what |
46 |
really compelled me to try it for myself. And that first-hand experience was |
47 |
very important, because I was able to learn for myself the good and bad of |
48 |
systemd. In the end, for me, personally, it turned out that there was more |
49 |
good than bad, so I stuck with it. |
50 |
|
51 |
> Heiko Baums |
52 |
|
53 |
Greetings |
54 |
-- |
55 |
Marc Joliet |
56 |
-- |
57 |
"People who think they know everything really annoy those of us who know we |
58 |
don't" - Bjarne Stroustrup |