From 9a95968d9e78ac9f87274ee13347fccb537f1b65 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Mar 06 2009 12:31:06 +0000 Subject: Fixed lockd not using settings in sysconfig/nfs (bz 461043) --- diff --git a/nfs-utils.spec b/nfs-utils.spec index da81dce..cce28fe 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser Name: nfs-utils URL: http://sourceforge.net/projects/nfs Version: 1.1.5 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 # group all 32bit related archs @@ -241,6 +241,9 @@ fi %attr(4755,root,root) /sbin/umount.nfs4 %changelog +* Fri Mar 6 2009 Steve Dickson 1.1.5-2 +- Fixed lockd not using settings in sysconfig/nfs (bz 461043) + * Thu Mar 5 2009 Steve Dickson 1.1.5-1 - Updated to latest upstream version: 1.1.5 diff --git a/nfs.init b/nfs.init index 643cfab..3e03625 100755 --- a/nfs.init +++ b/nfs.init @@ -55,21 +55,21 @@ case "$1" in # Start daemons. [ -x /usr/sbin/rpc.svcgssd ] && /sbin/service rpcsvcgssd start + # Set the ports lockd should listen on + if [ -n "$LOCKD_TCPPORT" -o -n "$LOCKD_UDPPORT" ]; then + [ -x /sbin/modprobe ] && /sbin/modprobe lockd $LOCKDARG + [ -n "$LOCKD_TCPPORT" ] && \ + /sbin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT >/dev/null 2>&1 + [ -n "$LOCKD_UDPPORT" ] && \ + /sbin/sysctl -w fs.nfs.nlm_udpport=$LOCKD_UDPPORT >/dev/null 2>&1 + fi + # Load the nfsd module so /proc/fs/nfsd will exist [ "$NFSD_MODULE" != "noload" ] && { [ -x /sbin/modprobe ] && /sbin/modprobe nfsd } - action $"Starting NFS services: " /usr/sbin/exportfs -r - # Set the ports lockd should listen on - if [ -n "$LOCKD_TCPPORT" ]; then - /sbin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT >/dev/null 2>&1 - fi - if [ -n "$LOCKD_UDPPORT" ]; then - /sbin/sysctl -w fs.nfs.nlm_udpport=$LOCKD_UDPPORT >/dev/null 2>&1 - fi - if [ -n "$RQUOTAD" -a "$RQUOTAD" != "no" ]; then echo -n $"Starting NFS quotas: " [ -n "$RQUOTAD_PORT" ] \ diff --git a/nfslock.init b/nfslock.init index 62f0065..5bbe144 100755 --- a/nfslock.init +++ b/nfslock.init @@ -44,11 +44,13 @@ start() { # See if the kernel lockd should start up # listening on a particular port # - [ -n "$LOCKD_TCPPORT" ] && \ - /sbin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT >/dev/null 2>&1 - [ -n "$LOCKD_UDPPORT" ] && \ - /sbin/sysctl -w fs.nfs.nlm_udpport=$LOCKD_UDPPORT >/dev/null 2>&1 - [ -n "$LOCKDARG" ] && modprobe lockd $LOCKDARG + if [ -n "$LOCKD_TCPPORT" -o -n "$LOCKD_UDPPORT" ]; then + [ -x /sbin/modprobe ] && /sbin/modprobe lockd $LOCKDARG + [ -n "$LOCKD_TCPPORT" ] && \ + /sbin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT >/dev/null 2>&1 + [ -n "$LOCKD_UDPPORT" ] && \ + /sbin/sysctl -w fs.nfs.nlm_udpport=$LOCKD_UDPPORT >/dev/null 2>&1 + fi echo -n $"Starting NFS statd: " # Set statd's local hostname if defined