mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-26 07:15:07 +02:00
Add pre-test before running test [PKGS-7388]
This commit is contained in:
parent
bce234fa00
commit
35d32fb5e4
@ -592,10 +592,10 @@
|
|||||||
#
|
#
|
||||||
# Test : PKGS-7388
|
# Test : PKGS-7388
|
||||||
# Description : Check security repository in Debian/ubuntu apt sources.list file
|
# 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
|
if [ $SKIPTEST -eq 0 ]; then
|
||||||
FOUND=0
|
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 [ ! "${OPTION_DEBIAN_SKIP_SECURITY_REPOSITORY}" = "yes" ]; then
|
||||||
if [ -f /etc/apt/sources.list ]; 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"
|
logtext "Searching for security.debian.org/security.ubuntu.com or security repositories in /etc/apt/sources.list file"
|
||||||
@ -634,9 +634,6 @@
|
|||||||
else
|
else
|
||||||
logtext "Skipped as option is set to ignore security repository"
|
logtext "Skipped as option is set to ignore security repository"
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
logtext "Result: skipping test as sources.list or sources.list.d is not found"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user