From: Darshaka Pathirana Date: Fri, 5 Mar 2021 15:07:46 +0000 (+0100) Subject: usr_sbin/grml-config-root: Fix a couple of shellcheck warnings X-Git-Tag: v2.11.0~1^2~13 X-Git-Url: http://git.grml.org/?p=grml-scripts.git;a=commitdiff_plain;h=eb97848aaf700ab117306609bfe3fe62280953c2 usr_sbin/grml-config-root: Fix a couple of shellcheck warnings - SC2006: Use $(..) instead of legacy `..`. - SC2230: which is non-standard. Use builtin 'command -v' instead. - SC2086: Double quote to prevent globbing and word splitting. --- diff --git a/usr_sbin/grml-config-root b/usr_sbin/grml-config-root index e1e1158..db6a2a5 100755 --- a/usr_sbin/grml-config-root +++ b/usr_sbin/grml-config-root @@ -9,8 +9,8 @@ PATH=${PATH:-'/bin/:/sbin/:/usr/bin:/usr/sbin'} # set up some variables -DIALOG=`which dialog` -PN=$(basename $0) +DIALOG=$(command -v dialog) +PN=$(basename "$0") if [ "$(id -ru)" != "0" ] ; then $DIALOG --msgbox "Error: $0 requires root permissions. Exiting." 0 0