You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
** # shellcheck -s sh -S warning /usr/bin/lynis
In /usr/bin/lynis line 1095:
. ${INCLUDEDIR}/helper_${HELPER} ${HELPER_PARAMS}
^--------------^ SC2240 (warning): The dot command does not support arguments in sh/dash. Set them as variables.
Rationale: In Bash and Ksh, you can use . myscript arg1 arg2.. to set $1 and $2 in the sourced script. This is not the case in Dash, where any additional arguments are ignored, or in POSIX sh where the behavior is unspecified. Instead, assign arguments to variables and rewrite the sourced script to read from them.
Version
Distribution: Fedora 38
** # uname -a
Linux localhost-live 6.2.9-300.fc38.x86_64 https://github.com/CISOfy/lynis/issues/1 SMP PREEMPT_DYNAMIC Thu Mar 30 22:32:58 UTC 2023 x86_64 GNU/Linux
** # lynis --version
egrep: warning: egrep is obsolescent; using grep -E
egrep: warning: egrep is obsolescent; using grep -E
3.0.8
Expected behavior
No warnings.
The text was updated successfully, but these errors were encountered:
Describe the bug
** #
shellcheck -s sh -S warning /usr/bin/lynis
** This text, from https://www.shellcheck.net/wiki/SC2240:
#!/bin/sh
. include/myscript example.com 80
#!/bin/sh
host=example.com port=80 . include/myscript
Version
Distribution: Fedora 38
** #
uname -a
** #
lynis --version
Expected behavior
No warnings.
The text was updated successfully, but these errors were encountered: