1 |
> * Finally, and what I think is the most fundamental difference between |
2 |
> systemd and almost any other init system: The service unit files in |
3 |
> systemd are *declarative*; you tell the daemon *what* to do, not *how* |
4 |
> to do it. If the service files are shell scripts (like in |
5 |
> OpenRC/SysV), everything can spiral out of control really easily. And |
6 |
> it usually does (again, look at sshd; and that one is actully nicely |
7 |
> written, there are all kind of monsters out there abusing the power |
8 |
> that shell gives you). |
9 |
> |
10 |
|
11 |
> Then Kevin started to suggest that I know nothing about init systems, |
12 |
> and I responded in kind. |
13 |
|
14 |
I did not and apologise if you took offense. I said perhaps badly that |
15 |
based on this posting, you don't have a great deal of experience in |
16 |
init systems. To me, your comment demonstrated that you don't on the |
17 |
vast plethora of init systems which all actually accomplish the same |
18 |
thing daemon wise just with varying reliability and functionality |
19 |
surrounding the process of doing so. No init system can tell a daemon |
20 |
how to do anything. |
21 |
|
22 |
So your comment. |
23 |
|
24 |
What to do, how to do actually has nothing to do with systemd. |
25 |
|
26 |
What does is having to learn a new more restrictive non |
27 |
intuitive and non externally useful or non universal *declarative* |
28 |
language. Like polkit/pkexecs javascript vs sudo. I will take sudoers |
29 |
every time and for good reason. |
30 |
|
31 |
"Shell scripts usually spiral out of control" is just utter FUD. I |
32 |
do realise you didn't originate this FUD, but it shouldn't be |
33 |
spread. Yes some corner case wants in init that some thought |
34 |
impossible in shell can get complex by scripting them but a small c |
35 |
tool following the unix philosophy simply becomes a shell command |
36 |
potentially useful in even unforeseeable cases. |
37 |
|
38 |
We are dealing with simple options meant for admins here. As I said |
39 |
OpenBSDs scripts are usually rediculously simple and should often |
40 |
really be called commands. As others have said the argument of function |
41 |
being in the scripts rather than the daemon is an irrelevance to using |
42 |
systemd. Systemd may try to become the whole OS but I'm fairly sure it |
43 |
hasn't plagiarised the c code to check and deal with ssh keys yet. That |
44 |
is rightly the job of the aptly named ssh-keygen and IMO some very |
45 |
simple shell code. |
46 |
|
47 |
The arch sshd script is only 44 lines and includes more than that to |
48 |
make the output colourful. The gentoo sshd script is actually simple |
49 |
too and doesn't do anything most of the time and is easily modifiable |
50 |
in absolutely predictable ways. |
51 |
|
52 |
-- |
53 |
_______________________________________________________________________ |
54 |
|
55 |
'Write programs that do one thing and do it well. Write programs to work |
56 |
together. Write programs to handle text streams, because that is a |
57 |
universal interface' |
58 |
|
59 |
(Doug McIlroy) |
60 |
_______________________________________________________________________ |