:: Re: [DNG] Init scripts in packages
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Steve Litt
Fecha:  
A: dng
Asunto: Re: [DNG] Init scripts in packages
On Thu, 06 Aug 2015 15:00:20 +0100
Rainer Weikusat <rainerweikusat@???> wrote:

> Laurent Bercot <ska-devel@???> writes:


> > There's a simple reason for that: "init scripts" aren't
> > "managing services". They can more or less start and stop them,
> > that's about it - and they're not even doing the starting and
> > the stopping right.
> >
> > - Starting ? Sure, it's easy to start a service: run the stuff,
> > and if it's a daemon, just fork it. Right ? Wrong. When you just
> > spawn the stuff from your shell, it runs with your shell's
> > environment (open fds, variables, terminals, so many parameters
> > that are *difficult* to clean up and really harden). But when you
> > spawn the stuff at boot time, it runs with the very different
> > environment provided by init. I can't count how many problem
> > reports I've read in support mailing-lists that were really hard to
> > track down, but in the end it was just a config issue because the
> > daemon launching script did not properly sanitize all its
> > environment, so it didn't give the same results when run by the
> > admin or when auto-run at boot time.
>
> That's all nice and dandy but it all boils down to 'the code executed
> by the init script was deficient in some way'.


Hi Rainer,

I think what Laurent is really saying is that if you choose to manage a
daemon via shellscript and PID file, it's very difficult to make your
shellscript in a way that *isn't* deficient in some way.

SteveT

Steve Litt
July 2015 featured book: Rapid Learning for the 21st Century
http://www.troubleshooters.com/rl21