Imported Debian patch 1.0.8-6 debian/1%1.0.8-6
authorSteinar H. Gunderson <sesse@debian.org>
Wed, 7 Jun 2006 21:30:15 +0000 (23:30 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 14 Jul 2010 01:30:05 +0000 (02:30 +0100)
debian/changelog
debian/control
debian/nfs-common.init
debian/nfs-kernel-server.init

index ab98c8b..a80e880 100644 (file)
@@ -1,9 +1,21 @@
+nfs-utils (1:1.0.8-6) unstable; urgency=low
+
+  * The last upload was a bit premature; it missed a change or two to the
+    init scripts (stdout vs. stderr output). Correcting now.
+
+ -- Steinar H. Gunderson <sesse@debian.org>  Wed,  7 Jun 2006 23:30:15 +0200
+
 nfs-utils (1:1.0.8-5) unstable; urgency=low
 
-  * Make nfs-kernel-server depend on at least version 1.0.8 of nfs-common;
-    lots of stuff will break with an upstream version mismatch.
+  * Patch nfs-common and nfs-kernel-server init scripts to make them more LSB
+    compatible, fixing issues with heartbeat2; based on patches by Kilian
+    CAVALOTTI. (Closes: #371084, #371085)
+    * Add --oknodo to start-stop-daemon in start targets, to make a second
+      "start" invocation return exit status 0.
+    * Add status targets to the two init scripts, with correct output and
+      exit codes.
 
- -- Steinar H. Gunderson <sesse@debian.org>  Wed,  7 Jun 2006 01:13:28 +0200
+ -- Steinar H. Gunderson <sesse@debian.org>  Wed,  7 Jun 2006 22:49:54 +0200
 
 nfs-utils (1:1.0.8-4) unstable; urgency=low
 
index cf6e4dd..a8e6f17 100644 (file)
@@ -9,7 +9,7 @@ Standards-Version: 3.7.2
 Package: nfs-kernel-server
 Priority: optional
 Architecture: any
-Depends: nfs-common (>= 1:1.0.8-1), sysvinit (>= 2.80-1), ucf, ${shlibs:Depends}
+Depends: nfs-common (>= 1:0.3.3-3), sysvinit (>= 2.80-1), ucf, ${shlibs:Depends}
 Provides: knfs, nfs-server
 Conflicts: knfs, nfs-server
 Replaces: knfs, nfs-server
index df5fca2..6de8336 100644 (file)
@@ -127,12 +127,12 @@ case "$1" in
        cd /    # daemons should have root dir as cwd
        printf "Starting $DESC:"
        printf " statd"
-       start-stop-daemon --start --quiet \
+       start-stop-daemon --start --oknodo --quiet \
            --exec $PREFIX/sbin/rpc.statd -- $STATDOPTS
        if [ "$NEED_LOCKD" = yes ]
        then
            printf " lockd"
-           start-stop-daemon --start --quiet \
+           start-stop-daemon --start --oknodo --quiet \
                --exec $PREFIX/sbin/rpc.lockd  || true
        fi
        if [ "$NEED_IDMAPD" = yes ] || [ "$NEED_GSSD" = yes ]
@@ -144,7 +144,7 @@ case "$1" in
                if [ "$NEED_IDMAPD" = yes ]
                then
                    printf " idmapd"
-                   start-stop-daemon --start --quiet \
+                   start-stop-daemon --start --oknodo --quiet \
                            --make-pidfile --pidfile $IDMAPD_PIDFILE \
                            --exec /usr/sbin/rpc.idmapd
                fi
@@ -152,7 +152,7 @@ case "$1" in
                then
                    do_modprobe rpcsec_gss_krb5
                    printf " gssd"
-                   start-stop-daemon --start --quiet \
+                   start-stop-daemon --start --oknodo --quiet \
                            --make-pidfile --pidfile $GSSD_PIDFILE \
                            --exec /usr/sbin/rpc.gssd -- $RPCGSSDOPTS
                fi
@@ -192,6 +192,44 @@ case "$1" in
        echo "."
        ;;
 
+  status)
+       if ! pidof rpc.statd >/dev/null
+       then
+           echo "rpc.statd not running"
+           exit 3
+       fi
+
+       if [ "$NEED_GSSD" = yes ]
+       then
+            if [ ! -f "$GSSD_PIDFILE" ] || [ "$( pidof rpc.gssd )" != "$( cat $GSSD_PIDFILE )"]
+           then
+               echo "rpc.statd running, but rpc.gssd halted"
+               exit 3
+           fi
+       fi
+
+       if [ "$NEED_LOCKD" = yes ]
+       then
+           if ! pidof rpc.lockd >/dev/null
+           then
+               echo "rpc.statd running, but rpc.lockd halted"
+               exit 3
+           fi
+       fi
+           
+       if [ "$NEED_IDMAPD" = yes ]
+       then
+            if [ ! -f "$IDMAPD_PIDFILE" ] || [ "$( pidof rpc.idmapd )" != "$( cat $IDMAPD_PIDFILE )"]
+           then
+               echo "rpc.statd running, but rpc.idmapd halted"
+               exit 3
+           fi
+       fi
+
+       echo "rpc.statd running"
+       exit 0
+       ;;
+
   restart | force-reload)
        $0 stop
        sleep 1
index d20e918..fb85f6c 100644 (file)
@@ -75,7 +75,7 @@ case "$1" in
 
                printf "Starting $DESC:"
                printf " nfsd"
-               start-stop-daemon --start --quiet \
+               start-stop-daemon --start --oknodo --quiet \
                    --nicelevel $RPCNFSDPRIORITY \
                    --exec $PREFIX/sbin/rpc.nfsd -- $RPCNFSDCOUNT
 
@@ -96,7 +96,7 @@ case "$1" in
 
                [ -z "$ClearAddr" ] || echo "nfsd 127.0.0.1 1" >/proc/net/rpc/auth.unix.ip/channel
 
-               start-stop-daemon --start --quiet \
+               start-stop-daemon --start --oknodo --quiet \
                    --exec $PREFIX/sbin/rpc.mountd -- $RPCMOUNTDOPTS
                echo "."
        else
@@ -122,6 +122,17 @@ case "$1" in
        echo "done."
        ;;
 
+  status)
+       if pidof nfsd >/dev/null
+       then
+           echo "nfsd running"
+           exit 0
+       else
+           echo "nfsd not running"
+           exit 3
+       fi
+       ;;
+
   reload | force-reload)
        printf "Re-exporting directories for $DESC..."
        $PREFIX/sbin/exportfs -r
@@ -135,7 +146,7 @@ case "$1" in
        ;;
 
   *)
-       echo "Usage: nfs-kernel-server {start|stop|reload|force-reload|restart}"
+       echo "Usage: nfs-kernel-server {start|stop|status|reload|force-reload|restart}"
        exit 1
        ;;
 esac