mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 21:24:31 +04:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user