On Sun, Jul 09, 2000 at 12:07:26AM -0400, Christopher W. Curtis wrote: > > Sure you could. Change: > > #!/bin/bash > . /etc/init.d/defaults foo > > to > > #!/bin/bash > . /etc/init.d/defaults foo $@ > > Rewrite the script in /etc/config.d/foo - you get persistence and > conffile isn't needed on the script. Please note that I'm suggesting > this be done, simply that it is possible. why would i do that when i could just rewrite the initscript to do what i want? and besides that you still have to edit the script anyway to get rid of the starting and stoping since those are items i have had to redo. (again bind) > What I've done (re: creating functions) is not terribly different from > writing something like ssd - just another tool that can be used. My > code happens to be written in bash, not C. ssd does not document its > return values in the manpage; I haven't looked at the source. so why not document start-stop-daemon, or perhaps add more return codes. > not. I provide a subset of ssd, plus a couple things it doesn't do. and your script lacks much function that start-stop does have. and your script obfuscates the initscript preventing a sysadmin from parsing a script quickly. > Why if the script comes with sensible defaults? um because things change, variables may become obsolete or need to be changed in some way. > "1+" is insufficient for meaningful error reporting. rubbish. there are plenty of return codes to use. > No, you don't need it, but it can be made easier if so. easier on who? not the sysadmin. and the sysadmin's needs are more important. > That's true - start, status, and [hup|term|usr1]. Since it doesn't try hence become obfuscated. just like redhat's > I didn't say that it should not ask permission to overwrite a changed > file. I say that it should not ever need to do such a thing (ie: > configuration changes go in a different file). there are generally so few configuration options in a initscript that its hardly worth the extra trouble and complication. in any event configuration variables in a seperate file need not have anything more then the following: if [ -f /etc/default/foo.conf ] ; then . /etc/default/foo.conf fi for things like $ARGS or $STARTDAEMON there is no need for them to be set. no need for obfuscated funtions and other crap. -- Ethan Benson http://www.alaska.net/~erbenson/
Attachment:
pgp0El326SmyV.pgp
Description: PGP signature