summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/nfs-utils
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils')
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver18
1 files changed, 14 insertions, 4 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
index 1ac6fec023..8ee8d0bb50 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
@@ -25,6 +25,7 @@ test -r /etc/default/nfsd && . /etc/default/nfsd
25test -x "$NFS_MOUNTD" || NFS_MOUNTD=/usr/sbin/rpc.mountd 25test -x "$NFS_MOUNTD" || NFS_MOUNTD=/usr/sbin/rpc.mountd
26test -x "$NFS_NFSD" || NFS_NFSD=/usr/sbin/rpc.nfsd 26test -x "$NFS_NFSD" || NFS_NFSD=/usr/sbin/rpc.nfsd
27test -x "$NFS_STATD" || NFS_STATD=/usr/sbin/rpc.statd 27test -x "$NFS_STATD" || NFS_STATD=/usr/sbin/rpc.statd
28test -z "$STATD_PID" && STATD_PID=/var/run/rpc.statd.pid
28# 29#
29# The user mode program must also exist (it just starts the kernel 30# The user mode program must also exist (it just starts the kernel
30# threads using the kernel module code). 31# threads using the kernel module code).
@@ -77,6 +78,17 @@ stop_mountd(){
77# 78#
78#nfsd 79#nfsd
79start_nfsd(){ 80start_nfsd(){
81 modprobe -q nfsd
82 grep -q nfsd /proc/filesystems || {
83 echo NFS daemon support not enabled in kernel
84 exit 1
85 }
86 grep -q nfsd /proc/mounts || mount -t nfsd nfsd /proc/fs/nfsd
87 grep -q nfsd /proc/mounts || {
88 echo nfsd filesystem could not be mounted at /proc/fs/nfsd
89 exit 1
90 }
91
80 echo -n "starting $1 nfsd kernel threads: " 92 echo -n "starting $1 nfsd kernel threads: "
81 start-stop-daemon --start --exec "$NFS_NFSD" -- "$@" 93 start-stop-daemon --start --exec "$NFS_NFSD" -- "$@"
82 echo done 94 echo done
@@ -115,14 +127,12 @@ stop_nfsd(){
115#statd 127#statd
116start_statd(){ 128start_statd(){
117 echo -n "starting statd: " 129 echo -n "starting statd: "
118 start-stop-daemon --start --exec "$NFS_STATD" 130 start-stop-daemon --start --exec "$NFS_STATD" --pidfile "$STATD_PID"
119 echo done 131 echo done
120} 132}
121stop_statd(){ 133stop_statd(){
122 # WARNING: this kills any process with the executable
123 # name 'statd'.
124 echo -n 'stopping statd: ' 134 echo -n 'stopping statd: '
125 start-stop-daemon --stop --quiet --signal 1 --name statd 135 start-stop-daemon --stop --quiet --signal 1 --pidfile "$STATD_PID"
126 echo done 136 echo done
127} 137}
128#---------------------------------------------------------------------- 138#----------------------------------------------------------------------