aboutsummaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorGravatar Andreas Ehmanns <universeII@gmx.de>2015-12-17 20:45:05 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-12-17 21:51:42 +0100
commitaf3befec827fcda0e2578e099f8c1a89533f3323 (patch)
tree9b84acfe4a404f8e937a541879af9d56693c09e7 /package
parent31cb23ca0a6ecf8238136520e16a20e077cb8812 (diff)
downloadbuildroot-af3befec827fcda0e2578e099f8c1a89533f3323.tar.gz
buildroot-af3befec827fcda0e2578e099f8c1a89533f3323.tar.bz2
nfsd: accept config to set number of threads
[Thomas: tweak commit title and author.] Signed-off-by: Andreas Ehmanns <universeII@gmx.de> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package')
-rwxr-xr-xpackage/nfs-utils/S60nfs12
1 files changed, 10 insertions, 2 deletions
diff --git a/package/nfs-utils/S60nfs b/package/nfs-utils/S60nfs
index ec7c909d47..5639b8f7e2 100755
--- a/package/nfs-utils/S60nfs
+++ b/package/nfs-utils/S60nfs
@@ -13,6 +13,14 @@ mkdir -p /run/nfs/sm
mkdir -p /run/nfs/sm.bak
touch /run/nfs/rmtab
+CFG_FILE=/etc/default/nfsd
+
+NR_THREADS=2
+if [ -f "${CFG_FILE}" ]; then
+ . "${CFG_FILE}"
+fi
+
+
start() {
# Start daemons.
printf "Starting NFS statd: "
@@ -25,7 +33,7 @@ start() {
echo "done"
printf "Starting NFS daemon: "
- rpc.nfsd 2
+ rpc.nfsd ${NR_THREADS}
echo "done"
printf "Starting NFS mountd: "
@@ -40,7 +48,7 @@ stop() {
killall -q rpc.mountd
echo "done"
- echo "Shutting down NFS daemon: "
+ printf "Shutting down NFS daemon: "
kill -9 `pidof nfsd` 2>/dev/null
echo "done"