mirror of https://github.com/CISOfy/lynis.git
Add pre-test before running test [PKGS-7388]
This commit is contained in:
parent
bce234fa00
commit
35d32fb5e4
|
@ -592,10 +592,10 @@
|
|||
#
|
||||
# Test : PKGS-7388
|
||||
# Description : Check security repository in Debian/ubuntu apt sources.list file
|
||||
Register --test-no PKGS-7388 --os Linux --weight L --network NO --description "Check security repository in Debian/ubuntu apt sources.list file"
|
||||
if [ -f /etc/apt/sources.list -a -d /etc/apt/sources.list.d ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||
Register --test-no PKGS-7388 --os preqs-met ${PREQS_MET} --weight L --network NO --description "Check security repository in Debian/ubuntu apt sources.list file"
|
||||
if [ $SKIPTEST -eq 0 ]; then
|
||||
FOUND=0
|
||||
if [ -f /etc/apt/sources.list -o -d /etc/apt/sources.list.d ]; then
|
||||
if [ ! "${OPTION_DEBIAN_SKIP_SECURITY_REPOSITORY}" = "yes" ]; then
|
||||
if [ -f /etc/apt/sources.list ]; then
|
||||
logtext "Searching for security.debian.org/security.ubuntu.com or security repositories in /etc/apt/sources.list file"
|
||||
|
@ -634,9 +634,6 @@
|
|||
else
|
||||
logtext "Skipped as option is set to ignore security repository"
|
||||
fi
|
||||
else
|
||||
logtext "Result: skipping test as sources.list or sources.list.d is not found"
|
||||
fi
|
||||
fi
|
||||
#
|
||||
#################################################################################
|
||||
|
|
Loading…
Reference in New Issue