Bug 90551

Summary: [PATCH] Support rpc.statd port in /etc/sysconfig/nfs
Product: [Retired] Red Hat Linux Reporter: Dax Kelson <dkelson>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-07-02 23:27:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to /etc/init.d/nfslock to use /etc/sysconfig/nfs none

Description Dax Kelson 2003-05-09 15:47:11 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
In the article:

http://www.lowth.com/LinWiz/nfs_help.html

Chris Lowth describes how to nail down all the various NFS server components to
use defined ports, enabling firewalls rules to be effective.

Currently, the RH /etc/init.d/nfs script consults the /etc/sysconfig/nfs file
for sysadmin defined values including specifying the MOUNTD_PORT.

I've written a patch to the /etc/init.d/nfslock SysV init script to also make
use of the /etc/sysconfig/nfs file for specifying the STATD_PORT for use by the
rpc.statd daemon.

I've tested

Please consider applying it.

--- nfslock-statdport   2003-05-09 09:23:06.000000000 -0600
+++ nfslock     2003-05-09 09:30:21.000000000 -0600
@@ -22,6 +22,9 @@
 # Check that networking is up.
 [ ${NETWORKING} = "no" ] && exit 0
  
+# Check for and source configuration file
+[ -f /etc/sysconfig/nfs ] && . /etc/sysconfig/nfs
+
 # Start lockd from userland only if kernel <= 2.2.18
 OS_RELEASE=`uname --release`
 OS_RELEASE_MAJOR=`echo "$OS_RELEASE" | sed 's/\(^[0-9]\)\..*/\1/'`
@@ -51,7 +54,13 @@
          echo
        fi
        echo -n $"Starting NFS statd: "
-       daemon rpc.statd
+
+       # See if a statd port has been defined
+        # by the sys admin in /etc/sysconfig/nfs
+        [ -n "$STATD_PORT" ] \
+        && RPCSTATDOPTS="$RPCSTATDOPTS -p $STATD_PORT"
+
+       daemon rpc.statd $RPCSTATDOPTS
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nfslock


Version-Release number of selected component (if applicable):
nfs-utils-1.0.1-2.9

Comment 1 Dax Kelson 2003-05-09 15:48:22 UTC
Created attachment 91587 [details]
Patch to /etc/init.d/nfslock to use /etc/sysconfig/nfs

Comment 2 Dax Kelson 2003-07-02 23:27:01 UTC
I just checked rawhide and noticed that nfs-utils-1.0.3-4.1.i386.rpm has my
patch applied.

Thanks!