MT#55283 add modprobe.d fragment

If the kernel module is loaded automatically/implicitly through
insertion of an iptables rule, it gets loaded with only the default
module parameters. Add a modprobe.d fragment to handle this case.

Change-Id: I08659e2f0db8fed401cbcce6edee51e942da1f3e
(cherry picked from commit 85b8a765d1)
mr10.5.6
Richard Fuchs 2 years ago
parent 09303cfd2d
commit 5b17e61951

@ -43,6 +43,18 @@ if [ "$1" = configure ]; then
chmod 0770 "$DIR"
fi
done
# set up modprobe.d fragment for auto-load usage
if ! [ -f /etc/modprobe.d/rtpengine.conf ] || grep -q DPKG-GENERATED /etc/modprobe.d/rtpengine.conf; then
OPTIONS="options xt_RTPENGINE proc_mask=0x7"
PUID=$(id -u rtpengine 2> /dev/null)
test -z "$PUID" || OPTIONS="$OPTIONS proc_uid=$PUID"
PGID=$(id -g rtpengine 2> /dev/null)
test -z "$PGID" || OPTIONS="$OPTIONS proc_gid=$PGID"
( echo "# DPKG-GENERATED FILE";
echo "$OPTIONS" ) > /etc/modprobe.d/rtpengine.conf
fi
fi
#DEBHELPER#

@ -5,6 +5,10 @@ set -e
if [ "$1" = purge ]; then
deluser --quiet --system rtpengine > /dev/null || true
delgroup --quiet --system rtpengine > /dev/null || true
if [ -f /etc/modprobe.d/rtpengine.conf ] && grep -q DPKG-GENERATED /etc/modprobe.d/rtpengine.conf; then
rm -f /etc/modprobe.d/rtpengine.conf
fi
fi
#DEBHELPER#

Loading…
Cancel
Save