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
rfuchs/64588
Morten Tryfoss 2 months ago committed by Richard Fuchs
parent 76d5e6d439
commit 14919df584

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

Loading…
Cancel
Save