mirror of
https://github.com/ovh/debian-cis.git
synced 2025-06-21 18:23:42 +02:00
IMP(shellcheck): replace -a in condition by && (SC2166)
This commit is contained in:
@ -28,7 +28,7 @@ while [[ $# > 0 ]]; do
|
||||
forcedstatus=auditall
|
||||
;;
|
||||
--audit)
|
||||
if [ "$status" != 'disabled' -a "$status" != 'false' ]; then
|
||||
if [ "$status" != 'disabled' ] && [ "$status" != 'false' ]; then
|
||||
debug "Audit argument detected, setting status to audit"
|
||||
forcedstatus=audit
|
||||
else
|
||||
@ -85,7 +85,7 @@ if [ "$forcedstatus" = "auditall" ]; then
|
||||
status=audit
|
||||
elif [ "$forcedstatus" = "audit" ]; then
|
||||
# We want to audit only enabled scripts
|
||||
if [ "$status" != 'disabled' -a "$status" != 'false' ]; then
|
||||
if [ "$status" != 'disabled' ] && [ "$status" != 'false' ]; then
|
||||
debug "Audit argument detected, setting status to audit"
|
||||
status=audit
|
||||
else
|
||||
|
@ -270,7 +270,7 @@ is_kernel_option_enabled() {
|
||||
FNRET=2 # Not found
|
||||
fi
|
||||
|
||||
if $SUDO_CMD [ "$FNRET" -ne 0 -a -n "$MODULE_NAME" -a -d "/lib/modules/$(uname -r)" ]; then
|
||||
if $SUDO_CMD [ "$FNRET" -ne 0 ] && [ -n "$MODULE_NAME" ] && [ -d "/lib/modules/$(uname -r)" ]; then
|
||||
# also check in modules, because even if not =y, maybe
|
||||
# the admin compiled it separately later (or out-of-tree)
|
||||
# as a module (regardless of the fact that we have =m or not)
|
||||
|
Reference in New Issue
Block a user