nfs-utils: added runit services.

This commit is contained in:
Juan RP 2014-10-13 17:10:49 +02:00
parent 5b0aca3085
commit 935572d8c5
4 changed files with 48 additions and 5 deletions

View file

@ -0,0 +1,6 @@
#!/bin/sh
umount -l /proc/fs/nfsd
umount -l /var/lib/nfs/rpc_pipefs
/usr/sbin/rpc.nfsd -- 0
/usr/sbin/exportfs -a -u

View file

@ -0,0 +1,28 @@
#!/bin/sh
# Make sure the statd service is running.
sv check statd >/dev/null || exit 1
# 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
modprobe sunrpc || exit 1
modprobe nfs || exit 1
modprobe nfsd || exit 1
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
# Uncomment this and add the two daemons if you need kerberos support.
# sv check idmapd gssd >/dev/null || exit 1
if ! mountpoint -q /proc/fs/nfsd; then
mount -t nfsd nfsd /proc/fs/nfsd || exit 1
fi
exportfs -ra > /dev/null || exit 1
rpc.nfsd -- $PROCESSES || exit 1
exec rpc.mountd --foreground

View file

@ -0,0 +1,6 @@
#!/bin/sh
# Make sure the portmap service is running.
sv check rpcbind >/dev/null || exit 1
exec rpc.statd -F -d

View file

@ -1,7 +1,7 @@
# Template file for 'nfs-utils'
pkgname=nfs-utils
version=1.3.1
revision=1
revision=2
short_desc="Network File System client utilities"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2"
@ -16,6 +16,7 @@ makedepends="libblkid-devel libmount-devel libtirpc-devel
libblkid-devel sqlite-devel"
depends="rpcbind"
conf_files="/etc/idmapd.conf"
replaces="runit-void<20141013_2"
make_dirs="
/var/lib/nfs/rpc_pipefs 0755 root root
/var/lib/nfs/sm 0750 root root"
@ -35,15 +36,15 @@ do_configure() {
do_build() {
make ${makejobs}
}
do_install() {
make DESTDIR=${DESTDIR} install
vmkdir usr/sbin
mv ${DESTDIR}/sbin/* ${DESTDIR}/usr/sbin
# conffiles
vinstall ${FILESDIR}/exports 644 etc
vinstall ${FILESDIR}/idmapd.conf 644 etc
vconf ${FILESDIR}/exports
vconf ${FILESDIR}/idmapd.conf
vsv statd
# systemd glue
if [ "$build_option_systemd" ]; then
vmkdir usr/lib/systemd/system
@ -56,7 +57,7 @@ do_install() {
nfs-utils-server_package() {
short_desc="Network File System utilities - Server utilities"
depends="rpcbind"
replaces="nfs-utils<1.2.6_2"
replaces="runit-void<20141013_2"
conf_files="/etc/exports"
make_dirs="
/var/lib/nfs/v4recovery 0755 root root
@ -80,5 +81,7 @@ nfs-utils-server_package() {
done
vmove usr/lib/systemd/system/proc-fs-nfsd.mount
fi
# runit services
vsv nfs-server
}
}