about summary refs log tree commit diff
path: root/services/nfs-server/run
blob: 630f70028ddaa44f96fea15e1634b42edfd984e7 (plain) (blame)
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
30
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