usr_bin/grml-lock: Fix a couple of shellcheck warnings
authorDarshaka Pathirana <dpat@syn-net.org>
Fri, 4 Dec 2020 11:03:40 +0000 (12:03 +0100)
committerDarshaka Pathirana <dpat@syn-net.org>
Fri, 3 Dec 2021 11:54:54 +0000 (12:54 +0100)
- 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 $?

usr_bin/grml-lock

index 27ba082..46e0ab5 100755 (executable)
@@ -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