Gentoo Archives: gentoo-user

From: Kevin Chadwick <ma1l1ists@××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Anyone switched to eudev yet? -> what was wron with SysVInit?
Date: Fri, 28 Dec 2012 23:27:07
Message-Id: 20121228232356.4880fe02@kc-sys.chadwicks.me.uk
In Reply to: Re: [gentoo-user] Re: Anyone switched to eudev yet? -> what was wron with SysVInit? by "Canek Peláez Valdés"
1 On Fri, 28 Dec 2012 13:14:46 -0600
2 Canek Peláez Valdés <caneko@×××××.com> wrote:
3
4 > On Fri, Dec 28, 2012 at 12:53 PM, Kevin Chadwick
5 > <ma1l1ists@××××××××.uk> wrote:
6 > > On Thu, 27 Dec 2012 17:38:15 -0600
7 > > Canek Peláez Valdés <caneko@×××××.com> wrote:
8 > >
9 > >> In SysV, I can *write* the daemon in the init script.
10 > >> In *that* sense, the init system tells the daemon how to do things,
11 > >
12 > > Please explain, sure there is the environment that tells a daemon
13 > > what to do. No shell can tell a c daemon like sshd how to drop
14 > > priviledges or use systrace but it could do these things for it in
15 > > a more fine grained manner before it tries and fails itself or if
16 > > the daemon wishes it to like monit. It's still not telling how but
17 > > duplicating or removing the need. That's just a bonus that applies
18 > > to all init systems because shell is so powerful on unix.
19 >
20 > Stop thinking in sshd. I can write the *whole* daemon in shell, not in
21 > another script file, but inside /etc/init.d/mystupiddaemon (or
22 > /etc/rc.whatever); shell is Turing-complete, I can write in it
23 > anything I can write in C (or in assembler, or machine code). In that
24 > sense, the init system (which uses shell for launching daemons) can be
25 > used to determine *how* the daemon behaves (because it uses shell for
26 > launching daemons).
27 >
28
29 That's what you meant, how disappointing. Yeah I've knocked up a few
30 very useful ones myself but call them scripts (Such as grepping logs or
31 dns servers and feeding real daemons with info).
32
33 > You can't do that with systemd; there is a clear and unavoidable
34
35 You can't is better is it? Yet you can exec a daemon written in shell
36 with systemd.
37
38 > separation between the starting/stoping/monitoring of daemons, and the
39 > daemons themselves.
40
41 > Such distinction doesn't really exists in SysV nor
42 > OpenRC (since they use shell, a Turing-complete language, for
43
44 With regular expressions to get the exact pid but
45
46 /usr/sbin/sshd -f /etc/ssh/sshd_config = start
47 /usr/bin/pkill sshd = stop or many other incantations
48
49 There are many tools that do this job just fine. If systemd just did
50 this and was there by default I would consider replacing monit with it.
51 Like a reliable root filesystem I want a reliable pid 1.
52
53 > launching daemons), and therefore you can mixup everything. I agree,
54 > it doesn't necessarily means that it *will* happen; but even the
55 > possibility is frigthning for a system administrator in a production
56 > server. With systemd, that possibility *doesn't exist* (because it
57 > doesn't uses a Turing-complete language to start/stop/monitor
58 > daemons).
59
60 Doesn't frighten me one bit. I know the startup almost inside out of my
61 servers, doesn't take long on OpenBSD. On Linux it would take longer but
62 nowhere near reviewing systemd and knowing C has nothing to do with the
63 immediate control shell can provide under any init system including
64 systemd but the Turing complete argument is simply propaganda as well
65 as all the features to distract from the fundamental flaws in the
66 design of systemd.
67
68 >
69 > Like the clear separation between content and presentation in webapps,
70 > or between the model and the view in the MVC design patter, having a
71 > clear separation between how you start/stop/monitor your daemon, and
72 > what the daemon does, is a good thing. If you don't agree with that,
73 > well, we must agree to disagree.
74
75 There is nothing else, you exec or parse a script or daemon just as
76 systemd does. The only difference is systemd tracking double forked
77 processes with cgroups and I have already provided a link that refutes
78 any point to do so. There are corner cases that are easily manageable
79 and it certainly isn't worth the sacrifice of POSIX compatibility and
80 so Linux applicability. Linus has said cgroups are a horrible
81 but necessary evil, which in my opinion means avoid them unless you have
82 no choice. There is a perfectly good and in my opinion superior
83 choice, but I love simplicity, it has served me well.

Replies

Subject Author
Re: [gentoo-user] Re: Anyone switched to eudev yet? -> what was wron with SysVInit? "Canek Peláez Valdés" <caneko@×××××.com>