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

Re: init script config files



On Mon, Jul 10, 2000 at 12:41:49PM +0200, Bernhard R. Link wrote:

> I had to change a little bit on a system boild on top of an old suse. 
> It was terrible. The script called a script, which called onother, which
> called the first with different paramters which called aanother. After the
> 15th (!!) script I got lost. (Perhaps earlier,but I didn't notice before).
> So I compared the file it got it input from with the man-page of the
> command to be invoked and guessed what it should do. (It took me 4 hours,
> before I did so, because I had to search the file manually, it wasn't 
> mentioned anywhere in the first 15 scriptfiles). 

this is precisly why i don't want any of this function nonsense.  the
most an initscript should source is the iniscript.conf file like so:

VAR=default
if [ -f /etc/config.d/initscript.conf ] ; then
	. /etc/config.d/initscript.conf
fi

which is what joey proposed i think.

anything more then that is uncessary obfuscation.

> What I kept was a nightmare against any script-system, one calling each
> other. One file mit Variables may be OK for easy changes, so that dpkg
> can overide the main-sript, because it is not changed. But the file itself
> should almost always be a conffile.
> 
> 
> And people don't have to write everything from scratch. They have s-s-d.
> It is the debian way of making it clear and simple.

/etc/init.d/skeleton.  for most daemons you only need to fill in the
blanks so to speak in a copy of this file and you have a consistent,
understandable initscript.  no need for any of this ball of funtions
squirelled away somewhere.

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpTR0UiGGLi5.pgp
Description: PGP signature


Reply to: