aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver')
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver46
1 files changed, 3 insertions, 43 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
index c263f14f32..6e0df7e2ea 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
@@ -1,8 +1,8 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: nfs-kernel-server
-# Required-Start: $remote_fs $portmap hwclock
-# Required-Stop: $remote_fs $portmap hwclock
+# Required-Start: $remote_fs nfs-common $portmap hwclock
+# Required-Stop: $remote_fs nfs-common $portmap hwclock
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Kernel NFS server support
@@ -24,8 +24,6 @@ test -r /etc/default/nfsd && . /etc/default/nfsd
# Location of executables:
test -x "$NFS_MOUNTD" || NFS_MOUNTD=/usr/sbin/rpc.mountd
test -x "$NFS_NFSD" || NFS_NFSD=/usr/sbin/rpc.nfsd
-test -x "$NFS_STATD" || NFS_STATD=/usr/sbin/rpc.statd
-test -z "$STATD_PID" && STATD_PID=/var/run/rpc.statd.pid
#
# The user mode program must also exist (it just starts the kernel
# threads using the kernel module code).
@@ -36,34 +34,9 @@ test -x "$NFS_NFSD" || exit 0
# ridiculous 99
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
-#
#----------------------------------------------------------------------
# Startup and shutdown functions.
# Actual startup/shutdown is at the end of this file.
-#directories
-create_directories(){
- echo -n 'creating NFS state directory: '
- mkdir -p "$NFS_STATEDIR"
- ( cd "$NFS_STATEDIR"
- umask 077
- mkdir -p sm sm.bak
- test -w sm/state || {
- rm -f sm/state
- :>sm/state
- }
- umask 022
- for file in xtab etab smtab rmtab
- do
- test -w "$file" || {
- rm -f "$file"
- :>"$file"
- }
- done
- )
- echo done
-}
#mountd
start_mountd(){
echo -n 'starting mountd: '
@@ -124,17 +97,6 @@ stop_nfsd(){
fi
}
-#statd
-start_statd(){
- echo -n "starting statd: "
- start-stop-daemon --start --exec "$NFS_STATD" --pidfile "$STATD_PID"
- echo done
-}
-stop_statd(){
- echo -n 'stopping statd: '
- start-stop-daemon --stop --quiet --signal 1 --pidfile "$STATD_PID"
- echo done
-}
#----------------------------------------------------------------------
#
# supported options:
@@ -144,13 +106,11 @@ stop_statd(){
# restart: stops and starts mountd
#FIXME: need to create the /var/lib/nfs/... directories
case "$1" in
- start) create_directories
+ start)
start_nfsd "$NFS_SERVERS"
start_mountd
- start_statd
test -r /etc/exports && exportfs -a;;
stop) exportfs -ua
- stop_statd
stop_mountd
stop_nfsd;;
status)