From 1212246766c8417d121a8215b9ce25d3657964eb Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Wed, 1 Mar 2017 13:19:19 +0100 Subject: [PATCH] TT#12000 ngcp-rtpengine-daemon.default: add missing TABLE * ngcp-rtpengine-daemon.postinst: fix checks for missing TABLE Fix #326 Change-Id: I6d87fbfec55a4d3557824a613f6967478d45e2e8 (cherry picked from commit 77f9e4c31003c6c757757b5706754ff8e6d0f813) --- debian/ngcp-rtpengine-daemon.default | 1 + debian/ngcp-rtpengine-daemon.postinst | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/ngcp-rtpengine-daemon.default b/debian/ngcp-rtpengine-daemon.default index 3c976f1b1..1f18caae0 100644 --- a/debian/ngcp-rtpengine-daemon.default +++ b/debian/ngcp-rtpengine-daemon.default @@ -2,3 +2,4 @@ RUN_RTPENGINE=no CONFIG_FILE=/etc/rtpengine/rtpengine.conf # CONFIG_SECTION=rtpengine PIDFILE=/var/run/ngcp-rtpengine-daemon.pid +TABLE=0 diff --git a/debian/ngcp-rtpengine-daemon.postinst b/debian/ngcp-rtpengine-daemon.postinst index 8b29de53e..60e584dcf 100644 --- a/debian/ngcp-rtpengine-daemon.postinst +++ b/debian/ngcp-rtpengine-daemon.postinst @@ -18,7 +18,10 @@ else . $default || true fi - if [ "$TABLE" -ge 0 -a -n "$NO_FALLBACK" -a \( "$NO_FALLBACK" = "1" -o "$NO_FALLBACK" = "yes" \) ]; then + if [ -n "$TABLE" ] && [ "$TABLE" -ge 0 ] && \ + [ -n "$NO_FALLBACK" ] && \ + ([ "$NO_FALLBACK" = "1" ] || [ "$NO_FALLBACK" = "yes" ]) + then if lsmod | grep -q $modname || modinfo $modname > /dev/null 2> /dev/null; then true else