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

nfs-common write pid file



I am running nfs-common from woody.

I was trying to modify the /etc/init.d/nfs-common script to write the pid
file of statd/lockd on startup.

Does this syntax look correct, I just need to add in a --pidfie to
start-stop-deamon to have a pidfile written for the process, correct?
Assuming I have defined LOCKDPID and STATDPID.


start)
        cd /    # daemons should have root dir as cwd
        printf "Starting $DESC:"
        printf " statd"
        start-stop-daemon --start --quiet --pidfile $LOCKDPID \
            --exec $PREFIX/sbin/rpc.statd
        if [ "$NEED_LOCKD" = yes ]
        then
            printf " lockd"
            start-stop-daemon --start --quiet --pidfile $STATDPID \
                --exec $PREFIX/sbin/rpc.lockd
        fi
        echo "."
        ;;

  stop)
        printf "Stopping $DESC:"
        if [ "$NEED_LOCKD" = yes ]
        then
            printf " lockd"
            start-stop-daemon --stop --oknodo --quiet --pidfile $LOCKDPID \
                --name rpc.lockd --user 0
        fi
        printf " statd"
        start-stop-daemon --stop --oknodo --quiet --pidfile $STATDPID \
            --name rpc.statd --user 0
        echo "."
        ;;


-- 
--Luke CS Sysadmin, Montana State University-Bozeman



Reply to: