summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/runitscripts/services/nfsd
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
commit7b29169fff9e7c624890c5edffe85def8a293136 (patch)
tree47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/core/runit-scripts/runitscripts/services/nfsd
parentc491dea779dac29afff3578bf8245943817c2339 (diff)
downloadlinhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2
LinHES 6.01.00
Diffstat (limited to 'abs/core/runit-scripts/runitscripts/services/nfsd')
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/nfsd/run29
1 files changed, 29 insertions, 0 deletions
diff --git a/abs/core/runit-scripts/runitscripts/services/nfsd/run b/abs/core/runit-scripts/runitscripts/services/nfsd/run
new file mode 100755
index 0000000..207d7cd
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/nfsd/run
@@ -0,0 +1,29 @@
+#!/bin/bash
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting NFSD"
+
+# Make sure the statd daemon is up
+# (the statd service must ensure portmap is running first)
+svwaitup /var/service/nfslock >/dev/null 2>/dev/null
+
+source /etc/conf.d/nfs
+
+# Re-export all directories in /etc/exports
+/usr/sbin/exportfs -ra > /dev/null 2>/dev/null
+
+# start some nfsd threads
+printhl " Using ${NFSD_OPTS} "
+/usr/sbin/rpc.nfsd ${NFSD_OPTS} >/dev/null 2>/dev/null
+
+# since we are running kernel 2.6 we should also
+# mount the nfsd virtual filesystem
+printhl " mount nfsd"
+/bin/mount -t nfsd none /proc/fs/nfsd >/dev/null 2>/dev/null
+
+# Start the rpc.mountd daemon
+
+exec /usr/sbin/rpc.mountd --foreground >/dev/null 2>/dev/null
+