[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: On init in Debian

On 03/17/2012 08:10 AM, Fernando Lemos wrote:
> Right now, creating a init script means copying an ugly 159-line
> skeleton and carefully editing it, hoping not to break anything while
> at it. Even if we can't have a single generator for multiple init
> systems, having something declarative to build most init scripts we
> need would be a big step forward and it would make a lot of sense as
> well in a future where we may need to support multiple init systems.


Having a shell script library for that would make it more declarative,
and less imperative, so we wouldn't have to write all of the script.

For me, that'd be quite easy enough. I'm proposing myself to write
such library if nobody wants to do it, but of course, I would need some
others to review my work. The ultimate goal would be that packages
would simply need to do something like:

DESC="package daemon description"

[ -e . /usr/share/sysv-lib/debsysv-lib ] && debsysv-init-lib $@

That's (in best cases) only 3 lines, (plus the lsb-base header)...
Of course, in many cases, we need a bit more, this could be
implemented with things like START_OPTS / STOP_OPTS and
so on, and maybe some hooks for start/stop functions.

Please comment on the above and give you ideas. Let's start
a discussion on how to simplify what we have already, this
can't hurt, whatever path we choose!


Reply to: