TT#56007 TT#55864 leave xt_RTPENGINE loaded after stop

There might be a firewall script that installs and manages the
xt_RTPENGINE rules even if rtpengine isn't running at the point. Leave
the module loaded if possible and unload it only for a package removal
or upgrade.

Change-Id: I5a35e965379aebd757a45883f82bbcb5fa2412e8
changes/32/28432/2
Richard Fuchs 6 years ago
parent 70b1ae5acb
commit 9c6677d2fd

@ -81,7 +81,6 @@ firewall_teardown()
iptables -D rtpengine -p udp -j RTPENGINE --id "$TABLE" 2>/dev/null
ip6tables -D rtpengine -p udp -j RTPENGINE --id "$TABLE" 2>/dev/null
rmmod $MODNAME 2>/dev/null
}
case "$1" in

@ -4,6 +4,7 @@ set -e
package=ngcp-rtpengine-kernel-dkms
name=ngcp-rtpengine
modname=xt_RTPENGINE
version=$(dpkg-query -W -f="\${Version}" "$package" \
|rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n")
@ -17,6 +18,7 @@ fi
# make sure it's not running
if [ -x /etc/init.d/ngcp-rtpengine-daemon ] ; then
invoke-rc.d ngcp-rtpengine-daemon stop || true
rmmod "$modname" 2>/dev/null || true
fi
if [ "$VIRT" = "yes" ]; then

Loading…
Cancel
Save