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
Created attachment 91587 [details] Patch to /etc/init.d/nfslock to use /etc/sysconfig/nfs
I just checked rawhide and noticed that nfs-utils-1.0.3-4.1.i386.rpm has my patch applied. Thanks!