Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kolenich <stephen.kolenich@tutanota.com>2020-08-07 03:15:18 +0300
committerSteve Kolenich <stephen.kolenich@tutanota.com>2020-08-07 03:15:18 +0300
commit33d8e8e00b94312e303dabb490d1165702380d8c (patch)
tree4464eae2aa72e34f1aeba1f08cb09f530e8cd9d6 /include/osdetection
parent138cce7f9c9ea5bb87c97527893d4e9b6457c995 (diff)
Adding Alpine Linux to OSDetection
Diffstat (limited to 'include/osdetection')
-rw-r--r--include/osdetection9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/osdetection b/include/osdetection
index 783662ad..c2726d31 100644
--- a/include/osdetection
+++ b/include/osdetection
@@ -144,6 +144,12 @@
OS_ID=$(grep "^ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
if [ -n "${OS_ID}" ]; then
case ${OS_ID} in
+ "alpine")
+ LINUX_VERSION="Alpine Linux"
+ OS_NAME=$(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_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ ;;
"amzn")
LINUX_VERSION="Amazon Linux"
OS_NAME="Amazon Linux"
@@ -268,6 +274,9 @@
fi
fi
+ # Alpine
+ if [ -e "/etc/alpine-release" ]; then LINUX_VERSION="Alpine Linux"; OS_VERSION=$(cat /etc/alpine-release); fi
+
# Amazon
if [ -z "${LINUX_VERSION}" -a -e "/etc/system-release" ]; then
FIND=$(grep "^Amazon" /etc/system-release)