From b42c1880b039299fb5f49ea1496c3bade961df6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 30 Sep 2017 04:55:24 +0200 Subject: [PATCH] Few more shellcheck warnings fixes/ignores --- misc/qubes-serial-login | 2 +- misc/upgrades-installed-check | 2 ++ qrexec/qubes-rpc-multiplexer | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/misc/qubes-serial-login b/misc/qubes-serial-login index 09f6802..861dda6 100755 --- a/misc/qubes-serial-login +++ b/misc/qubes-serial-login @@ -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 "$@" diff --git a/misc/upgrades-installed-check b/misc/upgrades-installed-check index e4eabe2..82c8e1b 100755 --- a/misc/upgrades-installed-check +++ b/misc/upgrades-installed-check @@ -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="$?" diff --git a/qrexec/qubes-rpc-multiplexer b/qrexec/qubes-rpc-multiplexer index 76133a7..2c3d105 100755 --- a/qrexec/qubes-rpc-multiplexer +++ b/qrexec/qubes-rpc-multiplexer @@ -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