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:
authorWagner <wagner+github@cert.at>2018-09-06 08:47:38 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2018-09-06 08:47:38 +0300
commit47de2dc4bf2a2c87670cff4276549930569491f8 (patch)
tree4b7e9cff3cd14498ada0e5ea9e6a131e387ae662
parent9fe6dcde7612be127280da8136fd22a38812b446 (diff)
fix opensuse os detection with os-release (#578)
-rw-r--r--CHANGELOG.md1
-rw-r--r--include/osdetection13
2 files changed, 14 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d80db9b7..689fb0e7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
- Command 'lynis show options' provides up-to-date list
- Option '--dump-options' is deprecated
- Several options and commands have been extended with more examples
+- OS detection with `/etc/os-release` now supports openSUSE
---------------------------------------------------------------------------------
diff --git a/include/osdetection b/include/osdetection
index 106d51d7..e4b90703 100644
--- a/include/osdetection
+++ b/include/osdetection
@@ -162,6 +162,19 @@
OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
OS_NAME="Ubuntu Linux"
;;
+ "opensuse-tumbleweed")
+ LINUX_VERSION="openSUSE Tumbleweed"
+ OS_FULLNAME=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ # It's rolling release but has a snapshot version (the date of the snapshot)
+ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ OS_NAME="openSUSE"
+ ;;
+ "opensuse-leap")
+ LINUX_VERSION="openSUSE Leap"
+ 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="openSUSE"
+ ;;
*)
Debug "Unknown OS found in /etc/os-release. Do you know what it is? Create an issue at ${PROGRAM_SOURCE}"
;;