From 45072fccfe2f3fd411eef78e92ba3fe5b8c7fa51 Mon Sep 17 00:00:00 2001 From: Mateusz Sylwestrzak Date: Sun, 27 Jul 2025 16:41:12 +0200 Subject: [PATCH] nfs-utils: add NFSv4-only option to slim down two NFSv3-related services --- srcpkgs/nfs-utils/files/nfs-server/run | 8 +++++--- srcpkgs/nfs-utils/template | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/srcpkgs/nfs-utils/files/nfs-server/run b/srcpkgs/nfs-utils/files/nfs-server/run index b7ed2aa45fd..4c485106bd0 100644 --- a/srcpkgs/nfs-utils/files/nfs-server/run +++ b/srcpkgs/nfs-utils/files/nfs-server/run @@ -1,15 +1,17 @@ #!/bin/sh exec 2>&1 -# Make sure the statd service is running. -sv check statd >/dev/null || exit 1 - # This was probably only used correctly to set PROCESSES [ -r /etc/conf.d/nfs-server.conf ] && . /etc/conf.d/nfs-server.conf # Settings in ./conf should be preferred over /etc/conf.d/nfs-server.conf [ -r ./conf ] && . ./conf +# If this var is set, there's no need to enable statd and rpcbind services as they pertain to NFSv3 +if [ -z "$NFSV4_ONLY" ]; then + sv check statd >/dev/null || exit 1 +fi + # 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 diff --git a/srcpkgs/nfs-utils/template b/srcpkgs/nfs-utils/template index f31c928e6e6..11ed2b44677 100644 --- a/srcpkgs/nfs-utils/template +++ b/srcpkgs/nfs-utils/template @@ -1,7 +1,7 @@ # Template file for 'nfs-utils' pkgname=nfs-utils version=2.8.3 -revision=2 +revision=3 build_style=gnu-configure configure_args="--with-statduser=nobody --enable-gss --enable-nfsv4 --with-statedir=/var/lib/nfs --enable-libmount-mount --enable-svcgss