From 14919df584524cf550c3c0543b521f9dd9609821 Mon Sep 17 00:00:00 2001 From: Morten Tryfoss Date: Thu, 5 Mar 2026 09:01:01 +0100 Subject: [PATCH] MT#55283 Make sure modprobe params are set for kernel module when using systemd, the same way as done in init.d scripts. Closes #2079 Change-Id: If464c0d91872200acafcfe1d4b4c31b7621a8e72 --- el/rtpengine.spec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/el/rtpengine.spec b/el/rtpengine.spec index a713e59f5..5fe8698cb 100644 --- a/el/rtpengine.spec +++ b/el/rtpengine.spec @@ -258,6 +258,19 @@ fi dkms build -m %{name} -v %{version}-%{release} --rpm_safe_upgrade && dkms install -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --force %endif + +if ! [ -f /etc/modprobe.d/rtpengine.conf ] || grep -q RPM-GENERATED /etc/modprobe.d/rtpengine.conf; then + OPTIONS="options nft_rtpengine proc_mask=0x7" + + PUID=$(id -u %{name} 2> /dev/null) + test -z "$PUID" || OPTIONS="$OPTIONS proc_uid=$PUID" + PGID=$(id -g %{name} 2> /dev/null) + test -z "$PGID" || OPTIONS="$OPTIONS proc_gid=$PGID" + + ( echo "# RPM-GENERATED FILE"; + echo "$OPTIONS" ) > /etc/modprobe.d/rtpengine.conf +fi + true