mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-29 16:54:26 +02:00
[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
|
# 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
|
if [ -f ${ROOTDIR}etc/apt/sources.list -a -d ${ROOTDIR}etc/apt/sources.list.d ]; then
|
||||||
case "${LINUX_VERSION}" in
|
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"
|
LogText "Skipping test, although sources.list or sources.list.d exists. This specific OS version most likely has no security repository"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
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
|
if [ $SKIPTEST -eq 0 ]; then
|
||||||
FOUND=0
|
FOUND=0
|
||||||
if [ ${OPTION_DEBIAN_SKIP_SECURITY_REPOSITORY} -eq 0 ]; then
|
if [ ${OPTION_DEBIAN_SKIP_SECURITY_REPOSITORY} -eq 0 ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user