]> code.ossystems Code Review - openembedded-core.git/commitdiff
nfs-utils: fix "sh: bad number" error on start/stop of nfsserver
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 16 Mar 2011 11:52:13 +0000 (11:52 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 18 Mar 2011 23:16:07 +0000 (23:16 +0000)
Adds a test to avoid the "sh: bad number" error message during service
start or stop of nfsserver when there is no NFS_SERVERS value set in
/etc/default/nfsd.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver

index fe76c515e08c8badde30cb122b204c8a27ac6bbe..69c871855f14e3948cc6bc071cea844fdb4ca1aa 100644 (file)
@@ -31,7 +31,7 @@ test -x "$NFS_NFSD" || exit 0
 #
 # Default is 8 threads, value is settable between 1 and the truely
 # ridiculous 99
-test "$NFS_SERVERS" -gt 0 && test "$NFS_SERVERS" -lt 100 || NFS_SERVERS=8
+test "$NFS_SERVERS" != "" && test "$NFS_SERVERS" -gt 0 && test "$NFS_SERVERS" -lt 100 || NFS_SERVERS=8
 #
 # The default state directory is /var/lib/nfs
 test -n "$NFS_STATEDIR" || NFS_STATEDIR=/var/lib/nfs