nfs-utils: support configuration file in nfs-server service

This commit is contained in:
Andrew J. Hesford 2022-12-11 10:17:05 -05:00
parent 7e54db7364
commit a5849260f9
2 changed files with 7 additions and 14 deletions

View file

@ -3,18 +3,11 @@
# Make sure the statd service is running. # Make sure the statd service is running.
sv check statd >/dev/null || exit 1 sv check statd >/dev/null || exit 1
# Uncomment and add daemons for kerberos support. # This was probably only used correctly to set PROCESSES
#sv check rpcidmapd >/dev/null || exit 1 [ -r /etc/conf.d/nfs-server.conf ] && . /etc/conf.d/nfs-server.conf
#sv check rpcsvgssd >/dev/null || exit 1
# Uncomment and add daemon for pNFS support. # Settings in ./conf should be preferred over /etc/conf.d/nfs-server.conf
#sv check rpcblkmapd >/dev/null || exit 1 [ -r ./conf ] && . ./conf
# Get the nfs service parameters from the LFS standard file
# this sets some envars.
if [ -e /etc/conf.d/nfs-server.conf ]; then
. /etc/conf.d/nfs-server.conf
fi
# Check/mount rpc_pipefs (loads sunrpc kernel module) # Check/mount rpc_pipefs (loads sunrpc kernel module)
if ! mountpoint -q /var/lib/nfs/rpc_pipefs; then if ! mountpoint -q /var/lib/nfs/rpc_pipefs; then
@ -27,8 +20,8 @@ if ! mountpoint -q /proc/fs/nfsd; then
fi fi
exportfs -ra > /dev/null || exit 1 exportfs -ra > /dev/null || exit 1
rpc.nfsd -- ${PROCESSES:=4} || exit 1 rpc.nfsd ${NFSD_OPTS} -- ${PROCESSES:=4} || exit 1
sm-notify sm-notify
exec rpc.mountd --foreground exec rpc.mountd ${MOUNTD_OPTS} --foreground

View file

@ -1,7 +1,7 @@
# Template file for 'nfs-utils' # Template file for 'nfs-utils'
pkgname=nfs-utils pkgname=nfs-utils
version=2.5.4 version=2.5.4
revision=1 revision=2
build_style=gnu-configure build_style=gnu-configure
configure_args="--with-statduser=nobody --enable-gss --enable-nfsv4 configure_args="--with-statduser=nobody --enable-gss --enable-nfsv4
--with-statedir=/var/lib/nfs --enable-libmount-mount --enable-svcgss --with-statedir=/var/lib/nfs --enable-libmount-mount --enable-svcgss