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

Re: init script config files



On Sat, Jul 08, 2000 at 12:52:22PM -0400, Christopher W. Curtis wrote:
> Joey Hess wrote:
> > Are you familiar with start-stop-daemon? Because you've just
> > re-implemented it.
>
> Vaguely, and no I haven't.  I did something of the same spirit, with
> far fewer options, and other added benefits. s-s-d doesn't (at least
> according to the man page) report many errors, and doesn't provide
> status information to the user.
>
> This is a scripting function for script writers.  It is not a
> replacement for s-s-d.  Look at the tarfile, not what I typed in from
> my memory of a half-dream state.

unfortunately, you're demonstrating the truism that "those who fail to
learn from history are doomed to repeat it". we've been there, done
that, and it was a bad idea. we moved on to something better.

long ago, we used to have a file containing shell functions sourced
by init.d scripts just like you suggest. that was the standard way
of writing our init.d scripts. we got rid of it because it was a
broken idea. like your suggestion, it was complicated and difficult to
understand. it was also fragile and tended to break when there was a
need to modify it. sure, it's possible to implement it in a non-fragile
manner but there is no need - just sourcing override VARIABLES (note,
not shell functions) is enough.

start-stop-daemon was also originally implemented as a shell script. we
got rid of that and replaced it with a C version which runs many times
faster (this is one of the reasons why debian systems boot up faster
than RH or other linux systems).

craig

--
craig sanders



Reply to: