nfs-utils: Add/update runit services for other nfs/rpc daemons
Added runit services for rpc.idmapd, rpc.gssd, rpc.svcgssd and blkmapd Fixed configure options to enable building svcgssd Restructured statd and nfs-server services
This commit is contained in:
parent
8b66be333b
commit
5f86935a4c
8 changed files with 80 additions and 12 deletions
|
@ -1,6 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
umount -l /proc/fs/nfsd
|
exportfs -ua
|
||||||
umount -l /var/lib/nfs/rpc_pipefs
|
|
||||||
rpc.nfsd -- 0
|
rpc.nfsd -- 0
|
||||||
exportfs -a -u
|
|
||||||
|
|
|
@ -3,26 +3,32 @@
|
||||||
# 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.
|
||||||
|
#sv check rpcidmapd >/dev/null || exit 1
|
||||||
|
#sv check rpcsvgssd >/dev/null || exit 1
|
||||||
|
|
||||||
|
# Uncomment and add daemon for pNFS support.
|
||||||
|
#sv check rpcblkmapd >/dev/null || exit 1
|
||||||
|
|
||||||
# Get the nfs service parameters from the LFS standard file
|
# Get the nfs service parameters from the LFS standard file
|
||||||
# this sets some envars.
|
# this sets some envars.
|
||||||
if [ -e /etc/conf.d/nfs-server.conf ]; then
|
if [ -e /etc/conf.d/nfs-server.conf ]; then
|
||||||
. /etc/conf.d/nfs-server.conf
|
. /etc/conf.d/nfs-server.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
modprobe sunrpc || exit 1
|
# Check/mount rpc_pipefs (loads sunrpc kernel module)
|
||||||
modprobe nfs || exit 1
|
|
||||||
modprobe nfsd || exit 1
|
|
||||||
if ! mountpoint -q /var/lib/nfs/rpc_pipefs; then
|
if ! mountpoint -q /var/lib/nfs/rpc_pipefs; then
|
||||||
mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs -o defaults || exit 1
|
mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs -o defaults || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Uncomment this and add the two daemons if you need kerberos support.
|
# Check/mount nfsd (loads nfsd kernel module)
|
||||||
# sv check idmapd gssd >/dev/null || exit 1
|
|
||||||
|
|
||||||
if ! mountpoint -q /proc/fs/nfsd; then
|
if ! mountpoint -q /proc/fs/nfsd; then
|
||||||
mount -t nfsd nfsd /proc/fs/nfsd || exit 1
|
mount -t nfsd nfsd /proc/fs/nfsd || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exportfs -ra > /dev/null || exit 1
|
exportfs -ra > /dev/null || exit 1
|
||||||
rpc.nfsd -- ${PROCESSES:=4} || exit 1
|
rpc.nfsd -- ${PROCESSES:=4} || exit 1
|
||||||
|
|
||||||
|
sm-notify
|
||||||
|
|
||||||
exec rpc.mountd --foreground
|
exec rpc.mountd --foreground
|
||||||
|
|
14
srcpkgs/nfs-utils/files/rpcblkmapd/run
Executable file
14
srcpkgs/nfs-utils/files/rpcblkmapd/run
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Make sure the portmap service is running.
|
||||||
|
sv check rpcbind >/dev/null || exit 1
|
||||||
|
|
||||||
|
# Check/mount rpc_pipefs (loads sunrpc kernel module)
|
||||||
|
if ! mountpoint -q /var/lib/nfs/rpc_pipefs; then
|
||||||
|
mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs -o defaults || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Load blkmapd module
|
||||||
|
modprobe blocklayoutdriver || exit 1
|
||||||
|
|
||||||
|
exec blkmapd -f
|
11
srcpkgs/nfs-utils/files/rpcgssd/run
Executable file
11
srcpkgs/nfs-utils/files/rpcgssd/run
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Make sure the portmap service is running.
|
||||||
|
sv check rpcbind >/dev/null || exit 1
|
||||||
|
|
||||||
|
# Check/mount rpc_pipefs (loads sunrpc kernel module)
|
||||||
|
if ! mountpoint -q /var/lib/nfs/rpc_pipefs; then
|
||||||
|
mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs -o defaults || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec rpc.gssd -f
|
16
srcpkgs/nfs-utils/files/rpcidmapd/run
Executable file
16
srcpkgs/nfs-utils/files/rpcidmapd/run
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Make sure the portmap service is running.
|
||||||
|
sv check rpcbind >/dev/null || exit 1
|
||||||
|
|
||||||
|
# Check/mount rpc_pipefs (loads sunrpc kernel module)
|
||||||
|
if ! mountpoint -q /var/lib/nfs/rpc_pipefs; then
|
||||||
|
mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs -o defaults || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check/mount nfsd (loads nfsd kernel module)
|
||||||
|
if ! mountpoint -q /proc/fs/nfsd; then
|
||||||
|
mount -t nfsd nfsd /proc/fs/nfsd || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec rpc.idmapd -f
|
16
srcpkgs/nfs-utils/files/rpcsvcgssd/run
Executable file
16
srcpkgs/nfs-utils/files/rpcsvcgssd/run
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Make sure the portmap service is running.
|
||||||
|
sv check rpcbind >/dev/null || exit 1
|
||||||
|
|
||||||
|
# Check/mount rpc_pipefs (loads sunrpc kernel module)
|
||||||
|
if ! mountpoint -q /var/lib/nfs/rpc_pipefs; then
|
||||||
|
mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs -o defaults || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check/mount nfsd (loads nfsd kernel module)
|
||||||
|
if ! mountpoint -q /proc/fs/nfsd; then
|
||||||
|
mount -t nfsd nfsd /proc/fs/nfsd || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec rpc.svcgssd -f
|
|
@ -3,4 +3,7 @@
|
||||||
# Make sure the portmap service is running.
|
# Make sure the portmap service is running.
|
||||||
sv check rpcbind >/dev/null || exit 1
|
sv check rpcbind >/dev/null || exit 1
|
||||||
|
|
||||||
exec rpc.statd -F -d
|
# Load nfs module
|
||||||
|
modprobe nfs || exit 1
|
||||||
|
|
||||||
|
exec rpc.statd -F -d -L
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# Template file for 'nfs-utils'
|
# Template file for 'nfs-utils'
|
||||||
pkgname=nfs-utils
|
pkgname=nfs-utils
|
||||||
version=1.3.4
|
version=1.3.4
|
||||||
revision=5
|
revision=6
|
||||||
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-gss
|
--with-statedir=/var/lib/nfs --enable-libmount-mount --enable-svcgss
|
||||||
--enable-uuid --enable-ipv6 --without-tcp-wrappers
|
--enable-uuid --enable-ipv6 --without-tcp-wrappers
|
||||||
--with-tirpcinclude=$XBPS_CROSS_BASE/usr/include/tirpc
|
--with-tirpcinclude=$XBPS_CROSS_BASE/usr/include/tirpc
|
||||||
--with-krb5=$XBPS_CROSS_BASE"
|
--with-krb5=$XBPS_CROSS_BASE"
|
||||||
|
@ -45,6 +45,10 @@ post_install() {
|
||||||
vconf ${FILESDIR}/exports
|
vconf ${FILESDIR}/exports
|
||||||
vconf ${FILESDIR}/idmapd.conf
|
vconf ${FILESDIR}/idmapd.conf
|
||||||
# runit services
|
# runit services
|
||||||
|
vsv rpcblkmapd
|
||||||
|
vsv rpcidmapd
|
||||||
|
vsv rpcgssd
|
||||||
|
vsv rpcsvcgssd
|
||||||
vsv statd
|
vsv statd
|
||||||
vsv nfs-server
|
vsv nfs-server
|
||||||
# replacement scripts
|
# replacement scripts
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue