Few more shellcheck warnings fixes/ignores

This commit is contained in:
Marek Marczykowski-Górecki 2017-09-30 04:55:24 +02:00
parent 2ee73ecfe7
commit b42c1880b0
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
3 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
if /bin/ls -l /proc/self/fd/0 | grep -q /dev/hvc0 ; then
exec su - $2
exec su - "$2"
exit
else
exec /bin/login "$@"

View File

@ -9,6 +9,7 @@
if [ -e /etc/system-release ]; then
## Fedora
# shellcheck disable=SC2034
yum_output="$(yum -q check-update 2>&1)"
exit_code="$?"
[ "$exit_code" -eq 100 ] && echo "false" && exit 0
@ -17,6 +18,7 @@ elif [ -e /etc/debian_version ]; then
## Debian
set -e
set -o pipefail
# shellcheck disable=SC2034
apt_get_update_output="$(apt-get -q update 2>&1)"
apt_get_upgrade_output="$(LANG="C" apt-get -s upgrade 2>&1)"
exit_code="$?"

View File

@ -37,10 +37,12 @@ for CFG_FILE in $LOCAL_QUBES_RPC/"$1" $QUBES_RPC/"$1" \
done
if [ -x "$CFG_FILE" ] ; then
# shellcheck disable=SC2086
exec "$CFG_FILE" ${QREXEC_SERVICE_ARGUMENT}
echo "$0: failed to execute handler for" "$1" >&2
exit 1
else
# shellcheck disable=SC2086
exec /bin/sh -- "$CFG_FILE" ${QREXEC_SERVICE_ARGUMENT}
echo "$0: failed to execute handler for" "$1" >&2
exit 1