From: Darshaka Pathirana Date: Fri, 4 Dec 2020 11:03:40 +0000 (+0100) Subject: usr_bin/grml-lock: Fix a couple of shellcheck warnings X-Git-Tag: v2.11.0~1^2~23 X-Git-Url: https://git.grml.org/?a=commitdiff_plain;h=e8b2d94100ec2a5fc5612bc63dc461b74061520b;p=grml-scripts.git usr_bin/grml-lock: Fix a couple of shellcheck warnings - SC2086: Double quote to prevent globbing and word splitting. - Ignore SC1091 - SC2230: which is non-standard. Use builtin 'command -v' instead - SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $? --- diff --git a/usr_bin/grml-lock b/usr_bin/grml-lock index 27ba082..46e0ab5 100755 --- a/usr_bin/grml-lock +++ b/usr_bin/grml-lock @@ -21,6 +21,7 @@ Usage: just execute $PN without any further options." fi if [ -r /etc/grml/script-functions ] ; then + # shellcheck disable=SC1091 . /etc/grml/script-functions check4progs physlock sudo chpasswd dialog || { echo "Sorry, necessary tools missing - can not continue. Exiting.">&2 ; exit 1 ; } fi