Bug 70708 - nfs initscript has wrong error handling
nfs initscript has wrong error handling
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: nfs-utils (Show other bugs)
8.0
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Steve Dickson
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-08-04 09:54 EDT by Peter van Egdom
Modified: 2007-04-18 12:45 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-06-15 17:43:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter van Egdom 2002-08-04 09:54:29 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1b) Gecko/20020721

Description of problem:
When I'm a non-root user and do the following :

[peterve@limbo-pc init.d]$ ./nfs stop
Stopping NFS mountd:                                       [FAILED]
Stopping NFS daemon:                                       [FAILED]
Stopping NFS services:                                     [  OK  ]
Stopping NFS quotas:                                       [FAILED]

(and again)

[peterve@limbo-pc init.d]$ ./nfs stop
Stopping NFS mountd:                                       [FAILED]
Stopping NFS daemon:                                       [FAILED]
Stopping NFS services:                                     [  OK  ]
Stopping NFS quotas:                                       [FAILED]

it says [  OK  ] at stopping NFS services.

It should not say that, let alone saying that _twice_ ! :-)


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. as a normal user : "./nfs stop" in "/etc/rc.d/init.d"
2.
3.
	

Actual Results:
Stopping NFS mountd:                                       [FAILED]
Stopping NFS daemon:                                       [FAILED]
Stopping NFS services:                                     [  OK  ]
Stopping NFS quotas:                                       [FAILED]


Expected Results:
Stopping NFS mountd:                                       [FAILED]
Stopping NFS daemon:                                       [FAILED]
Stopping NFS services:                                     [FAILED]
Stopping NFS quotas:                                       [FAILED]



Additional info:

Source RPM: nfs-utils-1.0.1-1.src.rpm
Comment 1 Iustin Pop 2002-12-07 18:02:30 EST
Moreover, when RQUOTAD=no in /etc/sysconfig/nfs, the start() function does not
start the rpc.rquotad daemon, but the stop function tries to stop it anyway, and
fails, so it gives an error. Also the status function ignores the case when
RQUOTAD=no. The /etc/rc.d/init.d/nfs scripts should be changed:
--- nfs.orig    2002-12-08 01:03:06.000000000 +0200
+++ nfs 2002-12-08 01:03:34.000000000 +0200
@@ -126,7 +126,7 @@
        echo -n $"Shutting down NFS daemon: "
        killproc nfsd
        echo
-       if [ -n "$RQUOTAD" ]; then
+       if [ -n "$RQUOTAD" -a "$RQUOTAD" != "no" ]; then
                echo -n "Shutting down NFS quotas: "
                killproc rpc.rquotad
                echo
@@ -139,7 +139,7 @@
   status)
        status rpc.mountd
        status nfsd
-       if [ -n "$RQUOTAD" ]; then
+       if [ -n "$RQUOTAD" -a "$RQUOTAD" != "no" ]; then
                status rpc.rquotad
        fi
        ;;
Comment 2 Steve Dickson 2004-06-15 17:43:20 EDT
although "Stopping NFS services:" is truly bad way to saying
"Removing exports", the fact of the matter it is succeeding...

w.r.t. comment 2, this patch is in the current release

Note You need to log in before you can comment on or make changes to this bug.