[nfs-utils/f16] Cleaned up the .preconfig and .postconfig files per code review request.

Steve Dickson steved at fedoraproject.org
Wed Aug 3 19:10:44 UTC 2011


commit fc0de09a58369e9b6ef04585fdfc6dea55904e99
Author: Steve Dickson <steved at redhat.com>
Date:   Wed Aug 3 15:02:59 2011 -0400

    Cleaned up the .preconfig and .postconfig files per code review request.
    
    Signed-off-by: Steve Dickson <steved at redhat.com>

 nfs-lock.preconfig    |    6 +++---
 nfs-server.postconfig |   11 ++++++-----
 nfs-server.preconfig  |    4 ++--
 nfs-utils.spec        |   10 +++++++---
 4 files changed, 18 insertions(+), 13 deletions(-)
---
diff --git a/nfs-lock.preconfig b/nfs-lock.preconfig
index 3a007c1..dbd6965 100644
--- a/nfs-lock.preconfig
+++ b/nfs-lock.preconfig
@@ -8,10 +8,10 @@
 # See if the kernel lockd should start up 
 # listening on a particular port
 #
-if [ -n "$LOCKD_TCPPORT" -o -n "$LOCKD_UDPPORT" ]; then 
-	[ -n "$LOCKD_TCPPORT" ] && \
+if [ -n "$LOCKD_TCPPORT" ]; then 
 		/sbin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT >/dev/null 2>&1
-	[ -n "$LOCKD_UDPPORT" ] && \
+fi
+if [ -n "$LOCKD_UDPPORT" ]; then
 		/sbin/sysctl -w fs.nfs.nlm_udpport=$LOCKD_UDPPORT >/dev/null 2>&1
 fi
 
diff --git a/nfs-server.postconfig b/nfs-server.postconfig
index 0d8b6b2..0cf7024 100644
--- a/nfs-server.postconfig
+++ b/nfs-server.postconfig
@@ -8,10 +8,11 @@
 #
 # Enabled the RDMA server support if configured to do so.
 # 
-# Make sure the modules is loaded
-[ -n "$RDMA_PORT" ] && /sbin/modprobe svcrdma
-
-# Enable the server to listen on the given port
-[ -n "$RDMA_PORT" ] && echo "rdma $RDMA_PORT" > /proc/fs/nfsd/portlist
+# Load the module and  then enable the server to listen 
+# on the given port
+if [ -n "$RDMA_PORT" ]; then 
+	/sbin/modprobe svcrdma
+	echo "rdma $RDMA_PORT" > /proc/fs/nfsd/portlist
+fi
 
 exit 0
diff --git a/nfs-server.preconfig b/nfs-server.preconfig
index 169232d..d965dbe 100644
--- a/nfs-server.preconfig
+++ b/nfs-server.preconfig
@@ -3,8 +3,8 @@
 . /etc/sysconfig/nfs
 
 # Set v4 grace period if requested
-[ -n "$NFSD_V4_GRACE" ] && {
+if [ -n "$NFSD_V4_GRACE" ]; then
 	echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4gracetime
-}
+fi
 
 exit 0
diff --git a/nfs-utils.spec b/nfs-utils.spec
index a6ed91e..27f7f78 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.2.4
-Release: 4%{?dist}
+Release: 5%{?dist}
 Epoch: 1
 
 # group all 32bit related archs
@@ -58,11 +58,11 @@ BuildRequires: libgssglue-devel libevent-devel libcap-devel
 BuildRequires: libnfsidmap-devel libtirpc-devel libblkid-devel
 BuildRequires: krb5-libs >= 1.4 autoconf >= 2.57 openldap-devel >= 2.2
 BuildRequires: automake, libtool, glibc-headers
-BuildRequires: krb5-devel, tcp_wrappers-devel, libmount-devel >= 2.20
+BuildRequires: krb5-devel, tcp_wrappers-devel, libmount-devel
 Requires(pre): shadow-utils >= 4.0.3-25
 Requires(pre): /sbin/chkconfig /sbin/nologin
 Requires: libnfsidmap libgssglue libevent
-Requires: libtirpc libblkid libcap libmount >= 2.20
+Requires: libtirpc libblkid libcap libmount
 Requires(post): systemd-units
 Requires(preun): systemd-units
 Requires(postun): systemd-units
@@ -265,6 +265,10 @@ fi
 %attr(4755,root,root)   /sbin/umount.nfs4
 
 %changelog
+* Wed Aug  3 2011 Steve Dickson <steved at redhat.com> 1.2.4-5
+- Cleaned up the .preconfig and .postconfig files per
+  code review request.
+
 * Wed Aug  3 2011 Steve Dickson <steved at redhat.com> 1.2.4-4
 - Converted init scrips to systemd services. (bz 699040)
 - Made nfsnobody's uid/gid to always be a 16-bit value of -2


More information about the scm-commits mailing list