Weblog entry #2 for pablosanchez

start-stop-daemon
Posted by pablosanchez on Mon 1 Oct 2007 at 04:05
Tags: ,
I've stumled upon a problem on lenny with saslauthd , precisely with /etc/init.d/saslauthd . It doesn't (re)start .

The problem here seems to be the line:
start-stop-daemon --start --quiet --pidfile $PIDFILE --name $NAME \
--exec $DAEMON --test > /dev/null
and the one that really starts saslauthd.

$NAME always return an empty string. So as for start-stop-daemon, it throws :
"start-stop-daemon: --start needs --exec or --startas
Try `start-stop-daemon --help' for more information."

Also, it's not set through all the script .

After some guessing, i chopped the $NAME thing and saslauthd came into life .

I know that fiddling with /etc/init.d scripts is no good practice, but :

1. should i remove permanently the $NAME stuff ?
2. is really $NAME really needed here ?
3. what should be, in that case $NAME value for saslauthd ?


Any hints, welcome.

Pablo .

 

Comments on this Entry

Posted by Steve (82.32.xx.xx) on Mon 1 Oct 2007 at 06:12
[ Send Message | View Steve's Scratchpad | View Weblogs ]

That doesn't seem to be the correct solution.

In my copy of the init script I see this:

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/usr/sbin:/usr/bin:/sbin:/bin
DESC="SASL Authentication Daemon"
NAME=saslauthd
...

So $NAME is set for the script, and is valid.

However by default the script is not configured to run you must edit /etc/default/saslauthd to change 'START=no' to 'START=yes', as per this in the init script:

# If the daemon is not enabled, give the user a warning and then exit,
# unless we are stopping the daemon
if [ "$START" != "yes" -a "$1" != "stop" ]; then
        log_warning_msg "To enable $NAME, edit /etc/default/$NAME and set START=
yes"
        exit 0
fi

Steve

[ Parent | Reply to this comment ]

Posted by pablosanchez (200.125.xx.xx) on Mon 1 Oct 2007 at 14:13
[ Send Message | View Weblogs ]
Steve, thanks for the input .

I did edit /etc/default/saslauthd to start at boot time .
For some strange reason,"NAME=saslauthd" is not in the /etc/init.d/saslauthd script, so i am putting it right now .
...

And it's working properly !

Many thanks for you time .

Pablo

[ Parent | Reply to this comment ]