On Dec 29, 2012 2:18 AM, "Canek Peláez Valdés" <can...@gmail.com> wrote:
>
> 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.

You got it wrong.

SysAdmins, especially Enterprise SysAdmins, will prefer total control of
the startup process. If a daemon is extremely important for enterprise
operation, any SysAdmin worth his/her salary will fire up vi (or emacs) and
pepper the code with asserts and instrumentation.

Having a Turing-complete language for starting a script is one of our (=
Enterprise SysAdmins) weapon for fixing up glitches due to some changes
introduced by the package maintainer.

An example: A dev needs a newer version of a package. We upgrade it. It
refuses to startup properly, but going back is out of the question because
the dev *needs* the features only available in the new version. We check
the (extremely) detailed logs. We find out what made the package balked. We
do some changes, and all is well.

Another example: After a security audit, we are required to upgrade a
certain daemon to a new version, despite the current version running well.
As we feared, the new version can't start. We use the detailed log to find
out what happened. We made changes. It works again.

In the two examples I give, having a C program doing all the starting will
certainly mean that complex things have to be done, not to mention the
headache of compiling them -- and possibly fail.

sh scripts are much easier to modify.

> 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.

That is the Theory. In Practice, things don't work that way. Murphy's Law
reigns supreme.

Rgds,
--

Reply via email to