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