[nfs-utils/f21] Change if statments to string comparisons in nfs-utils_env.sh (bz1170353)

Steve Dickson steved at fedoraproject.org
Fri Jan 2 13:36:54 UTC 2015


commit 0d1fb875d5ab6bc53dc98e81ad4b9c7d91bd2104
Author: Steve Dickson <steved at redhat.com>
Date:   Fri Jan 2 08:35:31 2015 -0500

    Change if statments to string comparisons in nfs-utils_env.sh (bz1170353)
    
    Signed-off-by: Steve Dickson <steved at redhat.com>

 nfs-utils.spec   |    5 ++++-
 nfs-utils_env.sh |    6 +++---
 2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/nfs-utils.spec b/nfs-utils.spec
index c307e91..d9d3214 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.3.1
-Release: 4.0%{?dist}
+Release: 4.1%{?dist}
 Epoch: 1
 
 # group all 32bit related archs
@@ -300,6 +300,9 @@ fi
 /sbin/umount.nfs4
 
 %changelog
+* Fri Jan  2 2015 Steve Dickson <steved at redhat.com> 1.3.1-4.1
+- Change if statments to string comparisons in nfs-utils_env.sh (bz 1170354)
+
 * Sat Dec 13 2014 Steve Dickson <steved at redhat.com> 1.3.1-4.0
 - Updated to latest upstream RC release: nfs-utils-1-3-2-rc4
 - Handle the rpcuser like other created users (bz 1165322)
diff --git a/nfs-utils_env.sh b/nfs-utils_env.sh
index 8f4dd10..ef55733 100644
--- a/nfs-utils_env.sh
+++ b/nfs-utils_env.sh
@@ -18,15 +18,15 @@ if [ -n "$LOCKD_TCPPORT" -o -n "$LOCKD_UDPPORT" ]; then
         /sbin/sysctl -w fs.nfs.nlm_udpport=$LOCKD_UDPPORT >/dev/null 2>&1
 fi
 
-if [ "$NFSD_V4_GRACE" -gt 0 ]; then
+if [ -n "$NFSD_V4_GRACE" ]; then
     grace="-G $NFSD_V4_GRACE"
 fi
 
-if [ "$NFSD_V4_LEASE" -gt 0 ]; then
+if [ -n "$NFSD_V4_LEASE" ]; then
     lease="-L $NFSD_V4_LEASE"
 fi
 
-if [ "$RPCNFSDCOUNT" -gt 0 ]; then
+if [ -n "$RPCNFSDCOUNT" ]; then
     nfsds=$RPCNFSDCOUNT
 else
     nfsds=8


More information about the scm-commits mailing list