summary refs log tree commit diff
path: root/services
diff options
context:
space:
mode:
authorEnno Boland <g@s01.de>2014-09-05 18:23:35 +0200
committerEnno Boland <g@s01.de>2014-09-05 18:23:35 +0200
commit67c9f63e8736dbf47cc1071a9d97098850cb4190 (patch)
tree9798326d508fb7e8b8d2b9f95276bd81844472f7 /services
parente46f3b8a06eea8a0691c105743171332ddda5911 (diff)
downloadrunit-void-67c9f63e8736dbf47cc1071a9d97098850cb4190.tar.gz
runit-void-67c9f63e8736dbf47cc1071a9d97098850cb4190.tar.xz
runit-void-67c9f63e8736dbf47cc1071a9d97098850cb4190.zip
New services: nfs-server, statd.
Diffstat (limited to 'services')
-rw-r--r--services/nfs-server/finish4
-rw-r--r--services/nfs-server/run31
-rw-r--r--services/statd/run6
3 files changed, 41 insertions, 0 deletions
diff --git a/services/nfs-server/finish b/services/nfs-server/finish
new file mode 100644
index 0000000..e392d80
--- /dev/null
+++ b/services/nfs-server/finish
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+/usr/sbin/rpc.nfsd -- 0
+/usr/sbin/exportfs -a -u
diff --git a/services/nfs-server/run b/services/nfs-server/run
new file mode 100644
index 0000000..630f700
--- /dev/null
+++ b/services/nfs-server/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# Make sure the statd service is running.
+sv check statd
+
+# Get the nfs service parameters from the LFS standard file
+# this sets some envars.
+source /etc/conf.d/nfs-server.conf
+
+echo "Loading kernel modules"
+modprobe sunrpc
+modprobe nfs
+modprobe nfsd
+
+echo "Mounting pipefs filesystem"
+mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs defaults
+
+# Uncomment this and add the two daemons if you need kerberos support.
+# sv check idmapd gssd
+
+echo "Mounting NFS filesystem"
+mount -t nfsd nfsd /proc/fs/nfsd
+
+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
diff --git a/services/statd/run b/services/statd/run
new file mode 100644
index 0000000..3bf16c5
--- /dev/null
+++ b/services/statd/run
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Make sure the portmap service is running.
+sv check rpcbind
+
+exec rpc.statd -F -d