TT#137760 Fix shellcheck issues

Fixes:

| In debian/ngcp-rtpengine-iptables-setup line 15:
| TABLE=$(/usr/libexec/rtpengine/rtpengine-get-table --config-file=$CONFIG_FILE)
|                                                                  ^----------^ SC2086: Double quote to prevent globbing and word splitting.
|
| In el/rtpengine.init line 36:
| configfile=${CONFIG_FILE-/etc/rtpengine/rtpengine.conf}
| ^--------^ SC2034: configfile appears unused. Verify use (or export if used externally).
|
| In el/rtpengine.init line 38:
| TABLE=$(/usr/libexec/rtpengine/rtpengine-get-table --config-file=$CONFIG_FILE)
|                                                                  ^----------^ SC2086: Double quote to prevent globbing and word splitting.

Those went unnoticed in commit 111b0a769c, but are failing
in github actions with shellcheck v0.7.2.

While at it, ensure that /etc/rtpengine/rtpengine.conf
is used as fallback, if CONFIG_FILE isn't defined.

Change-Id: I1c1948245a907bd6d299b242a9faff960d0608bc
pull/1373/head
Michael Prokop 4 years ago
parent 948c5fa541
commit 9a5e02535c

@ -12,7 +12,7 @@ if [ -f "$DEFAULTS" ]; then
fi
MODPROBE_OPTIONS=""
TABLE=$(/usr/libexec/rtpengine/rtpengine-get-table --config-file=$CONFIG_FILE)
TABLE=$(/usr/libexec/rtpengine/rtpengine-get-table --config-file="${CONFIG_FILE-/etc/rtpengine/rtpengine.conf}")
# Handle requested setuid/setgid.
if ! test -z "$SET_USER"; then

@ -11,7 +11,7 @@ if [ -f "$DEFAULTS" ]; then
. "$DEFAULTS" || true
fi
TABLE=$(/usr/libexec/rtpengine/rtpengine-get-table --config-file=$CONFIG_FILE)
TABLE=$(/usr/libexec/rtpengine/rtpengine-get-table --config-file="${CONFIG_FILE-/etc/rtpengine/rtpengine.conf}")
MODPROBE_OPTIONS=""
# Handle requested setuid/setgid.

@ -33,9 +33,8 @@ rtpengine=/usr/sbin/rtpengine
prog=rtpengine
pidfile=${PIDFILE-/run/rtpengine.pid}
lockfile=${LOCKFILE-/var/lock/subsys/rtpengine}
configfile=${CONFIG_FILE-/etc/rtpengine/rtpengine.conf}
cachefile=/var/lib/ngcp-rtpengine/rtpengine.cfg
TABLE=$(/usr/libexec/rtpengine/rtpengine-get-table --config-file=$CONFIG_FILE)
TABLE=$(/usr/libexec/rtpengine/rtpengine-get-table --config-file="${CONFIG_FILE-/etc/rtpengine/rtpengine.conf}")
PIDFILE=${pidfile}
RETVAL=0
OPTS=""

Loading…
Cancel
Save