:: Re: [DNG] Init scripts in packages
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Rainer Weikusat
Ημερομηνία:  
Προς: dng
Αντικείμενο: Re: [DNG] Init scripts in packages
Alexey Rochev <equeim@???> writes:
> Currently Debian packages contains both systemd units and init scripts.
> However, Debian developers refused to support several init systems. So it's
> only a matter of time when they remove init scripts from packages.


This would rid the world of a lot of code of very dubious usefulness most
of which should never have been written. One of the justifications for
systemd is actually that they idea (orchestrate/ implement system
startup based on the filesystem and with code written in the Bourne
shell language) must be bad because "Can't you see that a horrendous
mess they made of it?!" (only partially based on the visual effect of
seeing a lot of complicated looking code in a language one happens to be
almost totally unfamiliar with and all written by different people, ie,
in different styles --- even a lot of people who consider themselves
highly competent developers can't really cope with that).

But a bare-bones init script does really only three things:

1. Execute a command to start something.
2. Execute a command which stops it again.
3. Execute 2) then 1) for a restart.

Implementing this needs only marginally more text than this description
and the world won't end anytime soon for want of a fifteen (estimate)
line program. If anything else fails, I'd be willing to write it for
you.

Pet peeve: As part of my present job, I've developed a set of relatively
small command-line tools supposed to add more 'verbs' suitable for
managing services to the shell language (the largest is about 1300 LOC
but contains some features which really ought to become independent
programs). After experiences with a (simple) process manageing init I
wrote for an earlier embedded system, this was an intentional experiment
in "let's try it with small, independent programs written in C while
using the shell as control/ skeleton language for connecting them and
see how far I can get with that" (I can always try it with a big,
complicated program should this fail). After five years, the conclusion
is that this worked out beautifully. But this is - of course - all code
my employer claims copyright in, hence, it will ultimatively end up
getting systemd (or bernsteined or ... insert whatever the name of your
favorite init-with-process-manager-ipc-system-and-some-kitchen-sinks
written in a "real" programming language happens to be).

?
life is futile
we're all gonna to die
in the time between
have a coffee