From f4efa104b6ce8f930435bd875fe136dc674f32fd Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Wed, 16 May 2007 17:34:55 +0000 Subject: [PATCH] - Make sure the condrestarts exit with a zero value (bz 240225) --- nfs-utils.spec | 5 ++++- nfs.init | 14 +++++++++++++- nfslock.init | 6 +++--- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/nfs-utils.spec b/nfs-utils.spec index d370c6e..4e7c526 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser Name: nfs-utils URL: http://sourceforge.net/projects/nfs Version: 1.0.12 -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 # group all 32bit related archs @@ -316,6 +316,9 @@ fi %endif %changelog +* Wed May 16 2007 Steve Dickson 1.0.10-16 +- Make sure the condrestarts exit with a zero value (bz 240225) + * Wed May 10 2007 Steve Dickson 1.0.12-5 - Fix mount.nfs4 to display correct error message (bz 227212) - Updated mountd and showmount reverse lookup flags (bz 220772) diff --git a/nfs.init b/nfs.init index 13a90b3..5bb7b6c 100755 --- a/nfs.init +++ b/nfs.init @@ -44,6 +44,8 @@ fi # Remote quota server [ -z "$RQUOTAD" ] && RQUOTAD=`type -path rpc.rquotad` +RETVAL=0 + # See how we were called. case "$1" in start) @@ -65,11 +67,14 @@ case "$1" in [ -n "$RQUOTAD_PORT" ] \ && RPCRQUOTADOPTS="$RPCRQUOTADOPTS -p $RQUOTAD_PORT" daemon rpc.rquotad $RPCRQUOTADOPTS + RETVAL=$? echo fi echo -n $"Starting NFS daemon: " daemon rpc.nfsd $RPCNFSDARGS $RPCNFSDCOUNT + RETVAL=$? echo + [ $RETVAL -ne 0 ] && exit $RETVAL [ -n "$MOUNTD_PORT" ] \ && RPCMOUNTDOPTS="$RPCMOUNTDOPTS -p $MOUNTD_PORT" @@ -91,6 +96,7 @@ case "$1" in echo -n $"Starting NFS mountd: " daemon rpc.mountd $RPCMOUNTDOPTS + RETVAL=$? echo touch /var/lock/subsys/nfs @@ -121,7 +127,12 @@ case "$1" in fi # Do it the last so that clients can still access the server # when the server is running. - action $"Shutting down NFS services: " /usr/sbin/exportfs -au + cnt=`/usr/sbin/exportfs -v | /usr/bin/wc -l` + if [ $cnt -gt 0 ]; then + action $"Shutting down NFS services: " /usr/sbin/exportfs -au + else + action $"Shutting down NFS services: " /bin/false + fi rm -f /var/lock/subsys/nfs ;; status) @@ -131,6 +142,7 @@ case "$1" in if [ -n "$RQUOTAD" -a "$RQUOTAD" != "no" ]; then status rpc.rquotad fi + RETVAL=$? ;; restart) $0 stop diff --git a/nfslock.init b/nfslock.init index 1fa5349..82bbdf0 100755 --- a/nfslock.init +++ b/nfslock.init @@ -95,9 +95,9 @@ stop() { echo -n $"Stopping NFS statd: " killproc rpc.statd - RETVAL=0 + RETVAL=$? echo - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/nfslock + rm -f /var/lock/subsys/nfslock return $RETVAL } @@ -149,4 +149,4 @@ case "$1" in exit 1 esac -exit $? +exit $RETVAL