Browse Source

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 <daniel@makrotopia.org>
lilik-openwrt-22.03
Daniel Golle 3 years ago
parent
commit
025bca81a0
2 changed files with 7 additions and 2 deletions
  1. +1
    -1
      net/nfs-kernel-server/Makefile
  2. +6
    -1
      net/nfs-kernel-server/files/nfsd.init

+ 1
- 1
net/nfs-kernel-server/Makefile View File

@ -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


+ 6
- 1
net/nfs-kernel-server/files/nfsd.init View File

@ -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
}

Loading…
Cancel
Save