diff --git a/srcpkgs/nfs-utils/files/nfs-server/finish b/srcpkgs/nfs-utils/files/nfs-server/finish new file mode 100755 index 0000000000..696e778624 --- /dev/null +++ b/srcpkgs/nfs-utils/files/nfs-server/finish @@ -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 diff --git a/srcpkgs/nfs-utils/files/nfs-server/run b/srcpkgs/nfs-utils/files/nfs-server/run new file mode 100755 index 0000000000..ae438d77e4 --- /dev/null +++ b/srcpkgs/nfs-utils/files/nfs-server/run @@ -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 diff --git a/srcpkgs/nfs-utils/files/statd/run b/srcpkgs/nfs-utils/files/statd/run new file mode 100755 index 0000000000..f0283acf6f --- /dev/null +++ b/srcpkgs/nfs-utils/files/statd/run @@ -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 diff --git a/srcpkgs/nfs-utils/template b/srcpkgs/nfs-utils/template index 74e048fcdc..37e804b340 100644 --- a/srcpkgs/nfs-utils/template +++ b/srcpkgs/nfs-utils/template @@ -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 " 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 } }