summary refs log tree commit diff
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rwxr-xr-xservices/nfs-server/run32
-rwxr-xr-xservices/statd/run2
2 files changed, 14 insertions, 20 deletions
diff --git a/services/nfs-server/run b/services/nfs-server/run
index 630f700..2f18b2c 100755
--- a/services/nfs-server/run
+++ b/services/nfs-server/run
@@ -1,31 +1,25 @@
 #!/bin/sh
 
 # Make sure the statd service is running.
-sv check statd
+sv check statd >/dev/null || exit 1
 
 # Get the nfs service parameters from the LFS standard file
 # this sets some envars.
-source /etc/conf.d/nfs-server.conf
+if [ -e /etc/conf.d/nfs-server.conf ]; then
+	. /etc/conf.d/nfs-server.conf
+fi
 
-echo "Loading kernel modules"
-modprobe sunrpc
-modprobe nfs
-modprobe nfsd
+modprobe sunrpc || exit 1
+modprobe nfs || exit 1
+modprobe nfsd || exit 1
 
-echo "Mounting pipefs filesystem"
-mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs defaults
+mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs defaults || exit 1
 
 # Uncomment this and add the two daemons if you need kerberos support.
-# sv check idmapd gssd
+# sv check idmapd gssd >/dev/null || exit 1
 
-echo "Mounting NFS filesystem"
-mount -t nfsd nfsd /proc/fs/nfsd
+mount -t nfsd nfsd /proc/fs/nfsd || exit 1
+exportfs -ra > /dev/null || exit 1
+rpc.nfsd -- $PROCESSES || exit 1
 
-echo "Re-export all directories in /etc/exports"
-/usr/sbin/exportfs -ra > /dev/null
-
-echo "start some nfsd threads"
-/usr/sbin/rpc.nfsd -- $PROCESSES
-
-echo "Start the rpc.mountd daemon"
-exec /usr/sbin/rpc.mountd --foreground
+exec rpc.mountd --foreground
diff --git a/services/statd/run b/services/statd/run
index 3bf16c5..f0283ac 100755
--- a/services/statd/run
+++ b/services/statd/run
@@ -1,6 +1,6 @@
 #!/bin/sh
 
 # Make sure the portmap service is running.
-sv check rpcbind
+sv check rpcbind >/dev/null || exit 1
 
 exec rpc.statd -F -d