From d6ffc47ef6328c642effc94356d27833c7935c7ccbb1ba5dd5d5387d5a38e62d Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 18 Dec 2008 14:16:45 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nfs-utils?expand=0&rev=47 --- nfs-utils.changes | 10 ++++++++ nfs-utils.spec | 9 +++++++- nfs.init | 59 ++++++++++++++++++++--------------------------- 3 files changed, 43 insertions(+), 35 deletions(-) diff --git a/nfs-utils.changes b/nfs-utils.changes index e09cf89..754aabd 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Dec 18 00:35:09 CET 2008 - nfbrown@suse.de + +- nfs.init + * 'stop' should stop servies based on what is + running, not what is configured to be run. + bnc#459021 + * force-start added to start NFS services even + if nothing is in /etc/fstab. + ------------------------------------------------------------------- Mon Dec 08 15:37:13 CET 2008 - bwalle@suse.de diff --git a/nfs-utils.spec b/nfs-utils.spec index 531146b..c758c43 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -27,7 +27,7 @@ BuildRequires: libevent Url: http://nfs.sourceforge.net Summary: Support Utilities for Kernel nfsd Version: 1.1.3 -Release: 17 +Release: 18 Group: Productivity/Networking/NFS License: GPL v2 or later BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -291,6 +291,13 @@ rm -rf $RPM_BUILD_ROOT %doc nfs/*.html nfs/*.ps linux-nfs/* README.NFSv4 %changelog +* Thu Dec 18 2008 nfbrown@suse.de +- nfs.init + * 'stop' should stop servies based on what is + running, not what is configured to be run. + bnc#459021 + * force-start added to start NFS services even + if nothing is in /etc/fstab. * Mon Dec 08 2008 bwalle@suse.de - initrd: Giving the DHCP provided root path a higher priority compared to the fallback from fstab. Command line can still diff --git a/nfs.init b/nfs.init index 522f82d..6f04a4f 100644 --- a/nfs.init +++ b/nfs.init @@ -163,12 +163,7 @@ case "$1-$nfs" in echo -n "Not starting NFS client services - no NFS found in /etc/fstab:" rc_status -u ;; - stop-no ) - echo -n "No NFS client services to stop:" - rc_status -v - ;; - - start-yes|reload-yes) + start-yes|reload-yes|force-start-*) echo -n "Starting NFS client services:" if ! check_portmap ; then echo "portmap/rpcbind is not running" @@ -234,7 +229,7 @@ case "$1-$nfs" in # rc_status -v ;; - stop-yes) + stop* ) echo -n "Shutting down NFS client services:" rootfs=`awk '$2 == "/" && $1 != "rootfs" {print $3}' /proc/mounts` @@ -244,46 +239,42 @@ case "$1-$nfs" in rc_status -s else - - if test "$nfs" = yes ; then umount -alt nfs,nfs4 - fi - # stop gssd - if test "$NEED_GSSD" = yes ; then - echo -n " gssd" - killproc $GSSD_BIN - fi - - # stop idmapd - if test "$NEED_IDMAPD" = yes ; then - # only stop idmapd if it is not needed by server - if test ! -f $IDMAPD_SERVER_STATE ; then - echo -n " idmapd" - killproc $IDMAPD_BIN + # stop gssd + if checkproc $GSSD_BIN; then + echo -n " gssd" + killproc $GSSD_BIN fi - rm -f $IDMAPD_CLIENT_STATE - fi - # stop rpc.statd if not needed by server - if checkproc $STATD_BIN ; then - if [ `cat /proc/fs/nfsd/threads 2> /dev/null`0 -eq 0 ]; then - echo -n " rpc.statd" - killproc $STATD_BIN + # stop idmapd + if test -f $IDMAPD_CLIENT_STATE; then + # only stop idmapd if it is not needed by server + if test ! -f $IDMAPD_SERVER_STATE ; then + echo -n " idmapd" + killproc $IDMAPD_BIN + fi + rm -f $IDMAPD_CLIENT_STATE + fi + + # stop rpc.statd if not needed by server + if checkproc $STATD_BIN ; then + if [ `cat /proc/fs/nfsd/threads 2> /dev/null`0 -eq 0 ]; then + echo -n " rpc.statd" + killproc $STATD_BIN + fi fi - fi - umount_rpc_pipefs + umount_rpc_pipefs - # - rc_status -v + rc_status -v fi ;; restart*|force-reload*) ## Stop the service and regardless of whether it was ## running or not, start it again. $0 stop - $0 start + $0 force-start rc_status ;; status*)