On Fri, Dec 28, 2012 at 12:53 PM, Kevin Chadwick <ma1l1i...@yahoo.co.uk> wrote:
> On Thu, 27 Dec 2012 17:38:15 -0600
> Canek Peláez Valdés <can...@gmail.com> wrote:
>
>> In SysV, I can *write* the daemon in the init script.
>> In *that* sense, the init system tells the daemon how to do things,
>
> Please explain, sure there is the environment that tells a daemon what
> to do. No shell can tell a c daemon like sshd how to drop priviledges
> or use systrace but it could do these things for it in a more fine
> grained manner before it tries and fails itself or if the daemon
> wishes it to like monit. It's still not telling how but duplicating or
> removing the need. That's just a bonus that applies to all init
> systems because shell is so powerful on unix.

Stop thinking in sshd. I can write the *whole* daemon in shell, not in
another script file, but inside /etc/init.d/mystupiddaemon (or
/etc/rc.whatever); shell is Turing-complete, I can write in it
anything I can write in C (or in assembler, or machine code). In that
sense, the init system (which uses shell for launching daemons) can be
used to determine *how* the daemon behaves (because it uses shell for
launching daemons).

You can't do that with systemd; there is a clear and unavoidable
separation between the starting/stoping/monitoring of daemons, and the
daemons themselves. Such distinction doesn't really exists in SysV nor
OpenRC (since they use shell, a Turing-complete language, for
launching daemons), and therefore you can mixup everything. I agree,
it doesn't necessarily means that it *will* happen; but even the
possibility is frigthning for a system administrator in a production
server. With systemd, that possibility *doesn't exist* (because it
doesn't uses a Turing-complete language to start/stop/monitor
daemons).

Like the clear separation between content and presentation in webapps,
or between the model and the view in the MVC design patter, having a
clear separation between how you start/stop/monitor your daemon, and
what the daemon does, is a good thing. If you don't agree with that,
well, we must agree to disagree.

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México

Reply via email to