diff --git a/db/software-eol.db b/db/software-eol.db index d0452616..124334e9 100644 --- a/db/software-eol.db +++ b/db/software-eol.db @@ -9,6 +9,9 @@ # # Date can be converted on Linux using: date "+%s" --date=2020-01-01 # +# Note: For rolling releases or releases that do not (currently have an +# EOL date, leave field three empty and set field four to -1. +# # Amazon Linux # os:Amazon Linux:2020-06-30:1593468000: @@ -16,7 +19,7 @@ os:Amazon Linux 2:2023-06-26:1687730400: # # Arch Linux # -os:Arch Linux:2286-11-20:9999999999: +os:Arch Linux::-1: # # CentOS # diff --git a/include/osdetection b/include/osdetection index 12502e20..08fd931e 100644 --- a/include/osdetection +++ b/include/osdetection @@ -575,13 +575,17 @@ EOL_TIMESTAMP=$(awk -v value="${FIND}" -F: '{if ($1=="os" && value ~ $2){print $4}}' ${DBDIR}/software-eol.db | head -n 1) if [ -n "${EOL_TIMESTAMP}" ]; then EOL_DATE=$(awk -v value="${FIND}" -F: '{if ($1=="os" && value ~ $2){print $3}}' ${DBDIR}/software-eol.db | head -n 1) - NOW=$(date "+%s") - if [ -n "${NOW}" ]; then - if [ ${NOW} -gt ${EOL_TIMESTAMP} ]; then - EOL=1 - else - EOL=0 + if [ -n "${EOL_DATE}" ]; then + NOW=$(date "+%s") + if [ -n "${NOW}" ]; then + if [ ${NOW} -gt ${EOL_TIMESTAMP} ]; then + EOL=1 + else + EOL=0 + fi fi + else + EOL=0 fi fi fi