From 2db90f09fcf2c7d60096bc92597543887a2a9a08 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 5 Sep 2014 21:19:51 +0200 Subject: services/{nfs-server,statd}: misc tweaks; remember /bin/sh is not bash. --- services/nfs-server/run | 32 +++++++++++++------------------- services/statd/run | 2 +- 2 files changed, 14 insertions(+), 20 deletions(-) (limited to 'services') 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 -- cgit 1.4.1