]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Debian patches from amu
authorSam Hartman <hartmans@debian.org>
Sun, 5 Nov 2000 03:51:17 +0000 (03:51 +0000)
committerSam Hartman <hartmans@debian.org>
Sun, 5 Nov 2000 03:51:17 +0000 (03:51 +0000)
src/afsd/afs.rc.linux

index 4c20144283bb3d23ea607a3ab9ec428a70cdac10..8584f463bcd0e3aefcbcaf4277962dcc46008e01 100644 (file)
@@ -14,8 +14,8 @@
 
 
 # Gather up options and post startup script name, if present
-if [ -f /etc/sysconfig/afs ]; then
-       . /etc/sysconfig/afs
+if [ -f /etc/default/afs ]; then
+       . /etc/default/afs
 fi
 
 # is_on returns 1 if value of arg is "on"
@@ -129,20 +129,29 @@ case "$1" in
                exit 1
        fi
 
-       echo "Starting AFS services..... "
+       echo -n "Starting AFS services: "
        # Start bosserver, it if exists
        if  is_on $AFS_SERVER && test -x /usr/afs/bin/bosserver  ; then
-               /usr/afs/bin/bosserver 
+               start-stop-daemon --start --quiet --pidfile /var/run/bos.pid \
+                   --exec /usr/afs/bin/bosserver
+               echo -n " bosserver"
        fi
 
        # Start AFS client
        if  is_on $AFS_CLIENT && test -x /usr/vice/etc/afsd  ; then
-               /usr/vice/etc/afsd ${OPTIONS}
+               start-stop-daemon --start --quiet --exec /usr/vice/etc/afsd \
+                   -- ${OPTIONS}
+               echo -n " afsd"
 
                # Start AFS version of inetd.conf if present.
                if  test -f /usr/afsws/etc/inetd.conf -a -x /usr/afsws/etc/inetd.afs ; then
-                       /usr/afsws/etc/inetd.afs /usr/afsws/etc/inetd.conf
+                       start-stop-daemon --start --quiet \
+                           --pidfile /var/run/inetd.afs.pid \
+                           --exec /usr/afsws/etc/inetd.afs -- \
+                           /usr/afsws/etc/inetd.conf
+                       echo -n " inetd"
                fi
+               echo "."
                $AFS_POST_INIT
        fi
 
@@ -150,27 +159,37 @@ case "$1" in
 
   stop)
        # Stop AFS
-       echo "Stopping AFS services..... "
+       echo -n "Stopping AFS services: "
 
        if  is_on $AFS_CLIENT  ; then
-               killall inetd.afs
+               start-stop-daemon --stop --quiet \
+                   --pidfile /var/run/inetd.afs.pid && echo -n " inetd"
                umount /afs
+               echo -n " afsd"
        fi
 
        if  is_on $AFS_SERVER && test -x /usr/afs/bin/bos ; then
                echo "Stopping AFS bosserver"
                /usr/afs/bin/bos shutdown localhost -localauth -wait
-               killall -HUP bosserver
+               start-stop-daemon --stop --quiet --signal 1 \
+                   --pidfile /var/run/bos.pid
        fi
 
        LIBAFS=`/sbin/lsmod | fgrep libafs`
        if [ -n "$LIBAFS" ] ; then
                LIBAFS=`echo $LIBAFS | awk 'BEGIN { FS = " " } { print $1 }'`
                /sbin/rmmod $LIBAFS
+               echo -n " libafs"
        fi
+       echo "."
 
        ;;
 
+  restart|force-reload)
+       "$0" stop
+       "$0" start
+       ;;
+
   *)
        echo Usage: 'afs <start|stop>'