]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - debian/nfs-common.init
2002-09-12 H.J. Lu <hjl@lucon.org>
[nfs-utils.git] / debian / nfs-common.init
index a9dcb5d510ec94ddc9352c3240d8e48c1c8edc7b..2ae17b3e1b165b263a1ee9948275291ac021250e 100755 (executable)
 
 PREFIX=
 
+# Should rpc.statd listen on a specific port?
+# If so, set this variable to a statd argument like: "--port 1000".
+STATDPORT=""
+
 NEED_LOCKD=yes
 if test -f /proc/ksyms
 then
@@ -25,16 +29,14 @@ fi
 # What is this?
 DESC="NFS common utilities"
 
-# Make sure that daemon cwds are in root fs.
-cd /
-
 # See how we were called.
 case "$1" in
   start)
+       cd /    # daemons should have root dir as cwd
        printf "Starting $DESC:"
        printf " statd"
        start-stop-daemon --start --quiet \
-           --exec $PREFIX/sbin/rpc.statd
+           --exec $PREFIX/sbin/rpc.statd -- $STATDPORT
        if [ "$NEED_LOCKD" = yes ]
        then
            printf " lockd"
@@ -50,11 +52,11 @@ case "$1" in
        then
            printf " lockd"
            start-stop-daemon --stop --oknodo --quiet \
-               --name lockd --user root --signal 9
+               --name rpc.lockd --user 0
        fi
        printf " statd"
        start-stop-daemon --stop --oknodo --quiet \
-           --exec $PREFIX/sbin/rpc.statd
+           --name rpc.statd --user 0
        echo "."
        ;;