[Pkg-sysvinit-devel] Make init.d/skeleton a very simple init.d script?

Henrique de Moraes Holschuh hmh at debian.org
Mon Feb 3 10:26:18 UTC 2014


On Mon, 03 Feb 2014, Petter Reinholdtsen wrote:
> [Henrique de Moraes Holschuh]
> > Either "command -V", "command -v", or the "type" builtins should do, I
> > suppose.  Both dash and bash support them.
> > 
> > Note that it is non-trivial to know that the name really is a function due
> > to aliases, etc.  There is a bashism for this, but dash doesn't support it.
> > I don't think this detail matters for our intended use, though.
> 
> Ah, great.  Thank you for the tip.  I've implemented a second draft
> with reload support detection, pushed to the simpler-init-scripts
> branch.  Check it out.  Still need some cleanup in the actual daemon
> startup and lsb style reporting, I believe (should we split do_start
> in two, one doing the lsb style reporting and another doing the
> startup?), but the general structure should be ok.

I think it would be best to have a way to override the actual commands used
to start/stop/restart/force-reload.

Also, we need to document how people should override things, redefining the
functions is not obvious _and_ a shell might decide to spew out warnings, so
I favor the "{$foo_override:=foo}" way of calling these functions...  if it
looks like "dh", it is more likely people will use it correcty :-)

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



More information about the Pkg-sysvinit-devel mailing list