From 025bca81a018ea62500a5ec27fbee4fbadf66def Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 5 Aug 2021 10:51:35 +0100 Subject: [PATCH] nfs-kernel-server: reload when exported mountpoints show Use newly introduced procd_add_reload_mount_trigger to reload nfsd when a mountpoint covering an exported filesystem is added by blockd. Signed-off-by: Daniel Golle --- net/nfs-kernel-server/Makefile | 2 +- net/nfs-kernel-server/files/nfsd.init | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/net/nfs-kernel-server/Makefile b/net/nfs-kernel-server/Makefile index bb071eb70..8d563302f 100644 --- a/net/nfs-kernel-server/Makefile +++ b/net/nfs-kernel-server/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nfs-kernel-server PKG_VERSION:=2.5.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_HASH:=546ce4b51eeebc66e354b6cc6ca0ce509437efbdef0caaf99389534eef0e598b PKG_SOURCE_URL:=@SF/nfs diff --git a/net/nfs-kernel-server/files/nfsd.init b/net/nfs-kernel-server/files/nfsd.init index ccf676dcb..7b0f1751d 100644 --- a/net/nfs-kernel-server/files/nfsd.init +++ b/net/nfs-kernel-server/files/nfsd.init @@ -22,7 +22,7 @@ start_service() { mkdir -p $VAR_NFS chown nfs:nfs $VAR_NFS - sysctl -w fs.nfs.nlm_tcpport=32777 fs.nfs.nlm_udpport=32777 > /dev/null + sysctl -w fs.nfs.nlm_tcpport=32777 fs.nfs.nlm_udpport=32777 > /dev/null procd_open_instance procd_set_param command /usr/sbin/rpc.statd -p 32778 -o 32779 -F @@ -42,3 +42,8 @@ stop_service() { grep -q /proc/fs/nfsd /proc/mounts && \ umount /proc/fs/nfsd } + +service_triggers() { + local export_dirs="$(while read mp _r ; do echo -n "$mp " ; done < /etc/exports)" + procd_add_reload_mount_trigger $export_dirs +}