I'm running qmail on a vanilla RH 6.2 x86.  The only optional package I 
installed was Qmail-pgsql (http://www.fizzz.net/qmail+pgsql/).  Everything 
works fine if I directly start qmail from the command line by issuing one 
of the following two command as root (using bash):

        csh -cf '/var/qmail/rc &'
        /var/qmail/rc &

The problem is with running /etc/rc.d/init.d/qmail.  Whether the guts of 
the start case are any of the following, the script never terminates.

        daemon csh -cf '/var/qmail/rc &'
        daemon csh -cf '/var/qmail/rc'
        daemon /var/qmail/rc

Specifically it gets stuck in the call to "nice" made in the "daemon" 
routine defined in /etc/rc.d/init.d/functions:

        nice -n $nicelevel initlog $INITLOG_ARGS -c "$*" && success "$base 
startup" || failure "$base startup"

Could anyone tell me what would cause this behavior or how to fix it?  In 
case it would be helpful, my entire /etc/rc.d/init.d/qmail program is below 
(with alternate attempts commented out).  And, yes, I'm killing off qmail 
and su'd to root before running /etc/rc.d/init.d/qmail.

Thank you.

Ellen Spertus

#!/bin/sh
#
# qmail      This shell script takes care of starting and stopping
#               qmail.
#
# description: Qmail is a Mail Transport Agent, which is the program \
#              that moves mail from one machine to another.
# pidfile: /var/run/qmail.pid

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

DAEMON=yes
QUEUE=1h

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

# See how we were called.
case "$1" in
   start)
        # Start daemons.

        echo -n "Starting qmail: "
#       daemon csh -cf '/var/qmail/rc &'
        daemon csh -cf '/var/qmail/rc'
#       daemon /var/qmail/rc
        echo
        touch /var/lock/subsys/qmail
        ;;
   stop)
        # Stop daemons.
        echo -n "Shutting down qmail: "
        killproc qmail
        echo
        rm -f /var/lock/subsys/qmail
        ;;
   restart)
        $0 stop
        $0 start
        ;;
   status)
        status qmail
        ;;
   *)
        echo "Usage: qmail {start|stop|restart|status}"
        exit 1
esac

exit 0

Reply via email to