From e5b8047133a2f5107f4096c265ff075083e31776 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Tue, 13 Aug 2019 22:00:30 +0200 Subject: [PATCH] Added data and detection of Amazon Linux --- CHANGELOG.md | 1 + db/software-eol.db | 5 +++++ include/osdetection | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 765f578e..9c4b7275 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ measures to further tighten any possible misuse. - Measure timing of tests and report slow tests (10+ seconds) - Initial support for Clear Linux OS - Added end-of-life data of Arch Linux +- Detection and end-of-life data added for Amazon Linux ### Changed - Function: CheckItem() now returns only exit code (ITEM_FOUND is dropped) diff --git a/db/software-eol.db b/db/software-eol.db index 1d8505fb..87f5a065 100644 --- a/db/software-eol.db +++ b/db/software-eol.db @@ -9,6 +9,11 @@ # # Date can be converted on Linux using: date "+%s" --date=2020-01-01 # +# Amazon Linux +# +os:Amazon Linux:2020-06-30:1593468000: +os:Amazon Linux 2:2023-06-26:1687730400: +# # Arch Linux # os:Arch Linux:2286-11-20:9999999999: diff --git a/include/osdetection b/include/osdetection index 20e50b26..164a4597 100644 --- a/include/osdetection +++ b/include/osdetection @@ -141,6 +141,12 @@ OS_ID=$(grep "^ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') if [ -n "${OS_ID}" ]; then case ${OS_ID} in + "amzn") + LINUX_VERSION="Amazon Linux" + OS_FULLNAME=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') + OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') + OS_NAME="Amazon Linux" + ;; "arch") LINUX_VERSION="Arch Linux" OS_FULLNAME="Arch Linux"