From e5956f7f9feb3e748a40de02b3710612b482dd52 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 31 Jan 2019 14:17:14 +0100 Subject: [PATCH] el init script: ensure TABLE is set by default Otherwise we might end up with empty "$TABLE", while we're trying to execute: echo "del $TABLE" > /proc/rtpengine/control This will fail with `echo: write error: Invalid argument` error then. Instead set TABLE by default to '0'. Users can customize this via /etc/sysconfig/rtpengine, and the file is sourced after we set the default. Closes #696 Change-Id: I2f9bb810757507bcc01509ce02676af0d711f515 --- el/rtpengine.init | 3 +++ 1 file changed, 3 insertions(+) diff --git a/el/rtpengine.init b/el/rtpengine.init index 736f243b5..c337b22b0 100644 --- a/el/rtpengine.init +++ b/el/rtpengine.init @@ -19,6 +19,9 @@ # Source function library. . /etc/rc.d/init.d/functions +# defaults +TABLE=0 + if [ -f /etc/sysconfig/rtpengine ] then . /etc/sysconfig/rtpengine