On Mon, Apr 30, 2001 at 08:45:44AM +0300, Sami Haahtinen wrote:
> The 'exit 0' line in the beginning of the init file is a bad idea. for so many
> times i've commented out the '### comment this line to really start the
> service' lines. and then after upgrade gotten in to the position where i have
> to diff bethween two maintainer scripts to add the changes or just replace the
> old script and recomment the exit line.

The strategy I'm taking for mars-nwe's init.d script is:

case "$1" in
  start)
        test -f /etc/mars-nwe/nwserv.conf || exit 0
        if grep -q "^### NOT CONFIGURED YET ###" /etc/mars-nwe/nwserv.conf
        then
                echo "mars-nwe has not yet been configured."
                exit 0;
        fi
        echo -n "Starting $DESC: "

However, this is a special case, as my idea of "sensible defaults" are
very unlikely to appear sensible to most users. I'd rather the default
to be no service, rather than insecure server.

-- 
Paul Martin <[EMAIL PROTECTED]>

Attachment: pgpwo3GLOXXaf.pgp
Description: PGP signature

Reply via email to