mirror of https://github.com/sipwise/rtpengine.git
Squashed commit of the following:
commit 29560cc3dca2d5f3220cb2032088035a086bee12
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Wed Sep 17 15:15:48 2014 -0400
fix shell quoting
commit 3085b78377463225c52abc1a7c6d367924c2cb05
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Wed Sep 17 13:52:26 2014 -0400
silence modinfo stderr
commit f275f3dbb1d52113ece74132ac29ae2473b354bd
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Wed Sep 17 13:52:09 2014 -0400
s/MEDIAPROXY/RTPENGINE/
commit ff6b7db25d439eae69f561e71c5dd513cb061e57
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Wed Sep 17 11:28:26 2014 -0400
MT#9065 use modinfo/lsmod to probe for kernel module instead of dkms
commit 7d1841294e
Author: Victor Seva <vseva@sipwise.com>
Date: Tue Sep 16 20:56:57 2014 +0200
MT#9065 daemon: don't restart if kernel is needed but not yet installed
changes/57/8857/1
parent
3de07be0a3
commit
c1d7a52552
@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
default=/etc/default/ngcp-rtpengine-daemon
|
||||
modname=xt_MEDIAPROXY
|
||||
|
||||
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 kernel module check"
|
||||
else
|
||||
if [ -f $default ]; then
|
||||
. $default || true
|
||||
fi
|
||||
|
||||
if [ "$TABLE" -ge 0 -a -n "$NO_FALLBACK" -a \( "$NO_FALLBACK" = "1" -o "$NO_FALLBACK" = "yes" \) ]; then
|
||||
if lsmod | grep -q $modname || modinfo $modname > /dev/null 2> /dev/null; then
|
||||
true
|
||||
else
|
||||
echo "Kernel module $modname not found and NO_FALLBACK is set."
|
||||
echo "Daemon restart not performed."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
Loading…
Reference in new issue