From: Darshaka Pathirana Date: Thu, 11 Feb 2021 09:18:27 +0000 (+0100) Subject: usr_sbin/blacklist: Fix couple of shellcheck warnings: X-Git-Tag: v2.11.0~1^2~17 X-Git-Url: http://git.grml.org/?p=grml-scripts.git;a=commitdiff_plain;h=5d1287bc97c72e387c7cef4840d8c211504becd1 usr_sbin/blacklist: Fix couple of shellcheck warnings: - SC2086: Double quote to prevent globbing and word splitting. - Ignore SC1091: Not following: /etc/grml/lsb-functions was not specified as input (see shellcheck -x). --- diff --git a/usr_sbin/blacklist b/usr_sbin/blacklist index 8446a41..396dc08 100755 --- a/usr_sbin/blacklist +++ b/usr_sbin/blacklist @@ -6,8 +6,9 @@ # License: This file is licensed under the GPL v2. ################################################################################ -PN="$(basename $0)" +PN="$(basename "$0")" [ -n "$MODPROBEFILE" ] || MODPROBEFILE=/etc/modprobe.d/grml.conf +# shellcheck disable=SC1091 [ -r /etc/grml/lsb-functions ] && . /etc/grml/lsb-functions if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then @@ -17,7 +18,7 @@ if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then fi if [ "$(id -ru)" != "0" ] ; then - echo Error: become root before starting $0 >& 2 + echo "Error: become root before starting $0" >& 2 exit 100 fi