Re: /etc/init.d startup script issues onreboot

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

 



I had some time so I've gone back to look at this issue so
I figured I'd post some FYIs regarding this issue

when using the default ns-slapd script during a reboot of the system
ns-slapd will not start.

but changing a line in the script from

daemon ./ns-slapd $OPTIONS

./start-slapd &

during a reboot everything works fine. (obviously making sure you've cd to the correct directory
in these cases, etc)

Well after trying to compare a system that it actually works as expected on in terms of kernel, rpms, config with zero luck. A suggestion was made to change the start order - so changing the ns-slapd script from 13 to 99 and going back to the originally "daemon" line on a reboot everything works fine. It has been lowered to the lowest possible start number of 28 (ypbind is 27 , autofs is 28 as well) on this system. Comparing the two systems order only revealed kudzu was running on the non-working system - even turning this off didn't allow the start to be lowered back to the default of 13.

Strange that just having the "daemon" function in the start line causes some type of timing
issue.

Joe


From: Pete Rowley <prowley@xxxxxxxxxx>
Reply-To: "General discussion list for the Fedora Directory server project." <fedora-directory-users@xxxxxxxxxx> To: "General discussion list for the Fedora Directory server project." <fedora-directory-users@xxxxxxxxxx> Subject: Re: /etc/init.d startup script issues onreboot
Date: Fri, 26 May 2006 11:45:41 -0700

log?

Joe Sheehan wrote:
We are using the startup script for Fedora as
shown below with the corresponding /etc/sysconfig/ns-slapd
The problem is during a reboot ns-slapd doesn't start. (the run levels are set to 3,4,5).
From the command line though using this script it starts.

In the /var/log/messages for a reboot we see
sql_select option missing
auxpropfunc error no mechanism available
ns-slapd failed

For a command line start we see
sql_select option missing
auxpropfunc error no mechanism available
ns-slapd started successfully.

Those two errors seem to be consist with a permission problem similar to openldap
but we haven't had any luck with that yet BUT is there a way to figure out
why during a reboot it doesn't start besides getting a "ns-slapd failed".

Thanks (scripts below)

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

SLAPD_HOST=`hostname -a`
SLAPD_DIR=/opt/fedora-ds/bin/slapd/server
PIDFILE=$SLAPD_DIR/logs/pid
STARTPIDFILE=$SLAPD_DIR/logs/startpid

if [ -f /etc/sysconfig/ns-slapd ]; then
    . /etc/sysconfig/ns-slapd
fi


start() {
    echo -n "Starting Fedora Directory Server: "
    if [ -f $STARTPIDFILE ]; then
        PID=`cat $STARTPIDFILE`
        echo ns-slapd already running: $PID
        exit 2;
    elif [ -f $PIDFILE ]; then
        PID=`cat $PIDFILE`
        echo ns-slapd already running: $PID
        exit 2;
    else
        echo Here we go...
        cd $SLAPD_DIR
        daemon    ./ns-slapd $OPTIONS
        RETVAL=$?
            echo
           [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ns-slapd
           return $RETVAL
    fi

}

stop() {
    echo -n "Shutting down Fedora Directory Server: "
    echo
    killproc ns-slapd
    echo
    rm -f /var/lock/subsys/ns-slapd
    return 0
}

case "$1" in
   start)
    start
    ;;
   stop)
    stop
    ;;
   status)
    status ns-slapd
    ;;
   restart)
       stop
    start
    ;;
   *)
    echo "Usage: <servicename> {start|stop|status|restart}"
    exit 1
    ;;
esac
exit $?


--
Fedora-directory-users mailing list
Fedora-directory-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-directory-users


--
Pete



<< smime.p7s >>




--
Fedora-directory-users mailing list
Fedora-directory-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-directory-users


--
Fedora-directory-users mailing list
Fedora-directory-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-directory-users

[Index of Archives]     [Fedora Directory Users]     [Fedora Directory Devel]     [Fedora Announce]     [Fedora Legacy Announce]     [Kernel]     [Fedora Legacy]     [Share Photos]     [Fedora Desktop]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite News]

  Powered by Linux