Added data and detection of Amazon Linux

This commit is contained in:
Michael Boelen 2019-08-13 22:00:30 +02:00
parent 3e392c8e6c
commit e5b8047133
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
3 changed files with 12 additions and 0 deletions

View File

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

View File

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

View File

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