summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/runit-scripts/runitscripts/services/nfsd/run
blob: 207d7cd9fc405c1a534695b0bf1e01586448ddc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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