mirror of https://github.com/CISOfy/lynis.git
[PKGS-7388] Only perform test when all conditions are correct
This commit is contained in:
parent
cc78713c6a
commit
bc4146555c
|
@ -982,17 +982,19 @@
|
|||
#################################################################################
|
||||
#
|
||||
# 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
|
||||
PREQS_MET="NO"
|
||||
if [ -f ${ROOTDIR}etc/apt/sources.list -a -d ${ROOTDIR}etc/apt/sources.list.d ]; then
|
||||
case "${LINUX_VERSION}" in
|
||||
"Debian" | "Linux Mint" | "Ubuntu") PREQS_MET="YES" ;;
|
||||
"Debian" | "Linux Mint" | "Ubuntu")
|
||||
PREQS_MET="YES"
|
||||
;;
|
||||
*)
|
||||
PREQS_MET="NO"
|
||||
LogText "Skipping test, although sources.list or sources.list.d exists. This specific OS version most likely has no security repository"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
Register --test-no PKGS-7388 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check security repository in Debian/ubuntu apt sources.list file"
|
||||
Register --test-no PKGS-7388 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check security repository in apt sources.list file"
|
||||
if [ $SKIPTEST -eq 0 ]; then
|
||||
FOUND=0
|
||||
if [ ${OPTION_DEBIAN_SKIP_SECURITY_REPOSITORY} -eq 0 ]; then
|
||||
|
|
Loading…
Reference in New Issue