diff mbox series

[3/4] Revert "systemd: Apply all sysctl settings when NFS-related modules are loaded"

Message ID 20221125130725.1977606-4-carnil@debian.org (mailing list archive)
State New, archived
Headers show
Series Replace sysctl setting invocations triggered from udev rule instead of modprobe configuration | expand

Commit Message

Salvatore Bonaccorso Nov. 25, 2022, 1:07 p.m. UTC
This reverts commit afc7132dfb212ac1f676a5ac36d29a9e06325645.

The approach caused problems with sysctl from busybox and with kmod as
reported in Debian (https://bugs.debian.org/1024082).

Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
---
 systemd/50-nfs.conf | 16 ----------------
 systemd/Makefile.am | 10 ++--------
 2 files changed, 2 insertions(+), 24 deletions(-)
 delete mode 100644 systemd/50-nfs.conf
diff mbox series

Patch

diff --git a/systemd/50-nfs.conf b/systemd/50-nfs.conf
deleted file mode 100644
index b56b2d765969..000000000000
--- a/systemd/50-nfs.conf
+++ /dev/null
@@ -1,16 +0,0 @@ 
-# Ensure all NFS systctl settings get applied when modules load
-
-# sunrpc module supports "sunrpc.*" sysctls
-install sunrpc /sbin/modprobe --ignore-install sunrpc $CMDLINE_OPTS && /sbin/sysctl -q --pattern sunrpc --system
-
-# rpcrdma module supports sunrpc.svc_rdma.*
-install rpcrdma /sbin/modprobe --ignore-install rpcrdma $CMDLINE_OPTS && /sbin/sysctl -q --pattern sunrpc.svc_rdma --system
-
-# lockd module supports "fs.nfs.nlm*" and "fs.nfs.nsm*" sysctls
-install lockd /sbin/modprobe --ignore-install lockd $CMDLINE_OPTS && /sbin/sysctl -q --pattern fs.nfs.n[sl]m --system
-
-# nfsv4 module supports "fs.nfs.*" sysctls (nfs_callback_tcpport and idmap_cache_timeout)
-install nfsv4 /sbin/modprobe --ignore-install nfsv4 $CMDLINE_OPTS && /sbin/sysctl -q --pattern 'fs.nfs.(nfs_callback_tcpport|idmap_cache_timeout)' --system
-
-# nfs module supports "fs.nfs.*" sysctls
-install nfs /sbin/modprobe --ignore-install nfs $CMDLINE_OPTS && /sbin/sysctl -q --pattern fs.nfs --system
diff --git a/systemd/Makefile.am b/systemd/Makefile.am
index 63a50bf2c07e..e7f5d818a913 100644
--- a/systemd/Makefile.am
+++ b/systemd/Makefile.am
@@ -2,8 +2,6 @@ 
 
 MAINTAINERCLEANFILES = Makefile.in
 
-modprobe_files = 50-nfs.conf
-
 unit_files =  \
     nfs-client.target \
     rpc_pipefs.target \
@@ -53,7 +51,7 @@  endif
 
 man5_MANS	= nfs.conf.man
 man7_MANS	= nfs.systemd.man
-EXTRA_DIST = $(unit_files) $(modprobe_files) $(man5_MANS) $(man7_MANS)
+EXTRA_DIST = $(unit_files) $(man5_MANS) $(man7_MANS)
 
 generator_dir = $(unitdir)/../system-generators
 
@@ -75,12 +73,8 @@  rpc_pipefs_generator_LDADD = ../support/nfs/libnfs.la
 
 if INSTALL_SYSTEMD
 genexec_PROGRAMS = nfs-server-generator rpc-pipefs-generator
-install-data-hook: $(unit_files) $(modprobe_files)
+install-data-hook: $(unit_files)
 	mkdir -p $(DESTDIR)/$(unitdir)
 	cp $(unit_files) $(DESTDIR)/$(unitdir)
 	cp $(rpc_pipefs_mount_file) $(DESTDIR)/$(unitdir)/$(rpc_pipefsmount)
-else
-install-data-hook: $(modprobe_files)
 endif
-	mkdir -p $(DESTDIR)/usr/lib/modprobe.d
-	cp $(modprobe_files) $(DESTDIR)/usr/lib/modprobe.d/