Bug 90551 - [PATCH] Support rpc.statd port in /etc/sysconfig/nfs
[PATCH] Support rpc.statd port in /etc/sysconfig/nfs
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: nfs-utils (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Steve Dickson
Ben Levenson
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-09 11:47 EDT by Dax Kelson
Modified: 2007-04-18 12:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-07-02 19:27:01 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)
Patch to /etc/init.d/nfslock to use /etc/sysconfig/nfs (819 bytes, patch)
2003-05-09 11:48 EDT, Dax Kelson
no flags Details | Diff

  None (edit)
Description Dax Kelson 2003-05-09 11:47:11 EDT
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 11:48:22 EDT
Created attachment 91587 [details]
Patch to /etc/init.d/nfslock to use /etc/sysconfig/nfs
Comment 2 Dax Kelson 2003-07-02 19:27:01 EDT
I just checked rawhide and noticed that nfs-utils-1.0.3-4.1.i386.rpm has my
patch applied.

Thanks!

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