Bug 90551 - [PATCH] Support rpc.statd port in /etc/sysconfig/nfs
Summary: [PATCH] Support rpc.statd port in /etc/sysconfig/nfs
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: nfs-utils
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Steve Dickson
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-05-09 15:47 UTC by Dax Kelson
Modified: 2007-04-18 16:53 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-07-02 23:27:01 UTC
Embargoed:


Attachments (Terms of Use)
Patch to /etc/init.d/nfslock to use /etc/sysconfig/nfs (819 bytes, patch)
2003-05-09 15:48 UTC, Dax Kelson
no flags Details | Diff

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!


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