You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rtpengine/pkg/deb/old-dkms/rtpengine-kernel-dkms.prerm

33 lines
630 B

#!/bin/sh
set -e
package=rtpengine-kernel-dkms
name=rtpengine
modname=xt_RTPENGINE
version=$(dpkg-query -W -f="\${Version}" "$package" \
|rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n")
if [ -x "$(which ngcp-virt-identify)" ]; then
if ngcp-virt-identify --type container; then
VIRT="yes"
fi
fi
# make sure it's not running
if [ -x /etc/init.d/rtpengine-daemon ] ; then
invoke-rc.d rtpengine-daemon stop || true
rmmod "$modname" 2>/dev/null || true
fi
if [ "$VIRT" = "yes" ]; then
echo "Container environment detected. Skip dkms"
else
dkms remove -m "$name" -v "$version" --all || true
fi
#DEBHELPER#
exit 0