diff --git a/nfs-utils.spec b/nfs-utils.spec index 7a5fd13..2c1adfc 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -1,7 +1,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS server. Name: nfs-utils Version: 1.0.12 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 # group all 32bit related archs @@ -213,10 +213,10 @@ fi %preun if [ "$1" = "0" ]; then - /etc/rc.d/init.d/nfs stop - /etc/rc.d/init.d/rpcgssd stop - /etc/rc.d/init.d/rpcidmapd stop - /etc/rc.d/init.d/nfslock stop + /etc/rc.d/init.d/nfs condstop + /etc/rc.d/init.d/rpcgssd condstop + /etc/rc.d/init.d/rpcidmapd condstop + /etc/rc.d/init.d/nfslock condstop /sbin/chkconfig --del rpcidmapd /sbin/chkconfig --del rpcgssd /sbin/chkconfig --del rpcsvcgssd @@ -285,6 +285,9 @@ fi %endif %changelog +* Fri Mar 9 2007 Steve Dickson 1.0.12-2 +- Added condstop to all the initscripts (bz 196934) + * Tue Mar 6 2007 Steve Dickson 1.0.12-1 - Upgraded to 1.0.12 - Fixed typo in Summary. diff --git a/nfs.init b/nfs.init index 0c561f1..fca609e 100755 --- a/nfs.init +++ b/nfs.init @@ -160,8 +160,14 @@ case "$1" in $0 start } ;; + condstop) + [ -x /usr/sbin/rpc.svcgssd ] && /sbin/service rpcsvcgssd condstop + [ -f /var/lock/subsys/nfs ] && { + $0 stop + } + ;; *) - echo $"Usage: nfs {start|stop|status|restart|reload|condrestart}" + echo $"Usage: nfs {start|stop|status|restart|reload|condrestart|condstop}" exit 1 esac diff --git a/nfslock.init b/nfslock.init index f984140..7ef1c58 100755 --- a/nfslock.init +++ b/nfslock.init @@ -139,8 +139,13 @@ case "$1" in start } ;; + condstop) + [ -f /var/lock/subsys/nfslock ] && { + stop + } + ;; *) - echo $"Usage: $0 {start|stop|status|restart|probe|condrestart}" + echo $"Usage: $0 {start|stop|status|restart|probe|condrestart|condstop}" exit 1 esac diff --git a/rpcgssd.init b/rpcgssd.init index 2de002d..f44a24e 100755 --- a/rpcgssd.init +++ b/rpcgssd.init @@ -96,8 +96,14 @@ case "$1" in RETVAL=$? fi ;; + condstop) + if [ -f $LOCKFILE ]; then + $0 stop + RETVAL=$? + fi + ;; *) - echo $"Usage: $0 {start|stop|restart|condstart|condrestart|status}" + echo $"Usage: $0 {start|stop|restart|condstart|condrestart|condstop|status}" exit 1 esac diff --git a/rpcidmapd.init b/rpcidmapd.init index ce5fd18..6bee482 100755 --- a/rpcidmapd.init +++ b/rpcidmapd.init @@ -82,8 +82,14 @@ case "$1" in RETVAL=$? fi ;; + condstop) + if [ -f $LOCKFILE ]; then + $0 stop + RETVAL=$? + fi + ;; *) - echo $"Usage: $0 {start|stop|restart|condstart|condrestart|status}" + echo $"Usage: $0 {start|stop|restart|condstart|condrestart|condstop|status}" exit 1 esac diff --git a/rpcsvcgssd.init b/rpcsvcgssd.init index 0ea29e8..f1031b0 100755 --- a/rpcsvcgssd.init +++ b/rpcsvcgssd.init @@ -95,8 +95,14 @@ case "$1" in RETVAL=$? fi ;; + condstop) + if [ -f $LOCKFILE ]; then + $0 stop + RETVAL=$? + fi + ;; *) - echo $"Usage: $0 {start|stop|restart|condstart|condrestart|status}" + echo $"Usage: $0 {start|stop|restart|condstart|condrestart|condstop|status}" exit 1 esac