mirror of https://github.com/CISOfy/lynis.git
Merge pull request #1002 from kolenichsj/master
Adding Alpine Linux to OSDetection
This commit is contained in:
commit
3173dd8010
|
@ -144,6 +144,12 @@
|
||||||
OS_ID=$(grep "^ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
|
OS_ID=$(grep "^ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
|
||||||
if [ -n "${OS_ID}" ]; then
|
if [ -n "${OS_ID}" ]; then
|
||||||
case ${OS_ID} in
|
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")
|
"amzn")
|
||||||
LINUX_VERSION="Amazon Linux"
|
LINUX_VERSION="Amazon Linux"
|
||||||
OS_NAME="Amazon Linux"
|
OS_NAME="Amazon Linux"
|
||||||
|
@ -268,6 +274,9 @@
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Alpine
|
||||||
|
if [ -e "/etc/alpine-release" ]; then LINUX_VERSION="Alpine Linux"; OS_VERSION=$(cat /etc/alpine-release); fi
|
||||||
|
|
||||||
# Amazon
|
# Amazon
|
||||||
if [ -z "${LINUX_VERSION}" -a -e "/etc/system-release" ]; then
|
if [ -z "${LINUX_VERSION}" -a -e "/etc/system-release" ]; then
|
||||||
FIND=$(grep "^Amazon" /etc/system-release)
|
FIND=$(grep "^Amazon" /etc/system-release)
|
||||||
|
|
Loading…
Reference in New Issue