| @ -0,0 +1,35 @@ | |||||
| #!/bin/sh | |||||
| set -e | |||||
| default=/etc/default/ngcp-rtpengine-daemon | |||||
| name=ngcp-rtpengine | |||||
| if [ -x /usr/sbin/ngcp-virt-identify ]; then | |||||
| if /usr/sbin/ngcp-virt-identify --type container; then | |||||
| VIRT="yes" | |||||
| fi | |||||
| fi | |||||
| if [ "$VIRT" = "yes" ]; then | |||||
| echo "Container environment detected. Skip dkms check" | |||||
| else | |||||
| fallback=$(awk '/^NO_FALLBACK=(1|yes)/ { print "yes" }' "$default") | |||||
| if [ -x /usr/sbin/dkms ]; then | |||||
| isadded=`dkms status -m "$name"` | |||||
| else | |||||
| isadded="no" | |||||
| fi | |||||
| if [ "${fallback}" = "yes" ] && [ "x${isadded}" = "x" ] ; then | |||||
| echo "dkms module not found and NO_FALLBACK set to 'yes'" | |||||
| echo "Don't restart yet, ngcp-rtpengine-kernel-dkms will try" | |||||
| exit 0 | |||||
| fi | |||||
| fi | |||||
| #DEBHELPER# | |||||
| exit 0 | |||||