From 747661ff0df92a07855baa88f46549f339adf9da Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Wed, 8 Nov 2017 17:38:20 +0100 Subject: [PATCH] TT#24097 Do not use bash builtin names in sh scripts Even though this is a false-positive, it confuses checkbashisms. So let's rename the variables to something else, even more descriptive, to avoid the check error. Change-Id: Ife79bf76121bb4e3c120525ffe5a0eca871936f6 --- debian/ngcp-rtpengine-daemon.init | 12 ++++++------ debian/ngcp-rtpengine-recording-daemon.init | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/debian/ngcp-rtpengine-daemon.init b/debian/ngcp-rtpengine-daemon.init index dc7613e22..330de4a9c 100755 --- a/debian/ngcp-rtpengine-daemon.init +++ b/debian/ngcp-rtpengine-daemon.init @@ -127,19 +127,19 @@ fi if ! test -z "$SET_USER"; then START_OPTIONS="$START_OPTIONS --chuid $SET_USER" - UID=$(id -u "$SET_USER" 2> /dev/null) - test -z "$UID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_uid=$UID" + PUID=$(id -u "$SET_USER" 2> /dev/null) + test -z "$PUID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_uid=$PUID" if test -z "$SET_GROUP"; then - GID=$(id -g "$SET_USER" 2> /dev/null) - test -z "$GID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_gid=$GID" + PGID=$(id -g "$SET_USER" 2> /dev/null) + test -z "$PGID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_gid=$PGID" fi test "$DO_DIR_CHOWN" = 1 && chown "$SET_USER": "$PIDDIR" fi if ! test -z "$SET_GROUP"; then START_OPTIONS="$START_OPTIONS --group $SET_GROUP" - GID=$(grep "^$SET_GROUP:" /etc/group | cut -d: -f3 2> /dev/null) - test -z "$GID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_gid=$GID" + PGID=$(grep "^$SET_GROUP:" /etc/group | cut -d: -f3 2> /dev/null) + test -z "$PGID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_gid=$PGID" test "$DO_DIR_CHOWN" = 1 && chgrp "$SET_GROUP" "$PIDDIR" fi diff --git a/debian/ngcp-rtpengine-recording-daemon.init b/debian/ngcp-rtpengine-recording-daemon.init index c27177c6d..b584cdde3 100755 --- a/debian/ngcp-rtpengine-recording-daemon.init +++ b/debian/ngcp-rtpengine-recording-daemon.init @@ -57,19 +57,19 @@ fi if ! test -z "$SET_USER"; then START_OPTIONS="$START_OPTIONS --chuid $SET_USER" - UID=$(id -u "$SET_USER" 2> /dev/null) - test -z "$UID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_uid=$UID" + PUID=$(id -u "$SET_USER" 2> /dev/null) + test -z "$PUID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_uid=$PUID" if test -z "$SET_GROUP"; then - GID=$(id -g "$SET_USER" 2> /dev/null) - test -z "$GID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_gid=$GID" + PGID=$(id -g "$SET_USER" 2> /dev/null) + test -z "$PGID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_gid=$PGID" fi test "$DO_DIR_CHOWN" = 1 && chown "$SET_USER": "$PIDDIR" fi if ! test -z "$SET_GROUP"; then START_OPTIONS="$START_OPTIONS --group $SET_GROUP" - GID=$(grep "^$SET_GROUP:" /etc/group | cut -d: -f3 2> /dev/null) - test -z "$GID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_gid=$GID" + PGID=$(grep "^$SET_GROUP:" /etc/group | cut -d: -f3 2> /dev/null) + test -z "$PGID" || MODPROBE_OPTIONS="$MODPROBE_OPTIONS proc_gid=$PGID" test "$DO_DIR_CHOWN" = 1 && chgrp "$SET_GROUP" "$PIDDIR" fi