[PKGS-7388] Only perform test when all conditions are correct

This commit is contained in:
Michael Boelen 2020-03-19 10:51:02 +01:00
parent cc78713c6a
commit bc4146555c
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
1 changed files with 6 additions and 4 deletions

View File

@ -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