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-10-23 13:16:36 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2018-10-23 13:16:36 +0300
commitc94b97bd9e2ce706c77fe83e5924b781c402cc76 (patch)
tree7add1ac342f215188f56cfaa7d2c7d02fafc47cc
parentc52edc49c7ef760e29deb6dd484f197b7f4b8f60 (diff)
osdetection: ignore quotes in OS_ID (#593)
-rw-r--r--CHANGELOG.md1
-rw-r--r--include/osdetection2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 65e1e93d..a632c363 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@
### Changed
- Changed several warning labels on screen
- AUTH-9308 - More generic sulogin for systemd rescue.service
+- OS detection now ignores quotes for getting the OS ID.
---------------------------------------------------------------------------------
diff --git a/include/osdetection b/include/osdetection
index 4b8d29be..55c5ff9c 100644
--- a/include/osdetection
+++ b/include/osdetection
@@ -137,7 +137,7 @@
# Generic
if [ -e /etc/os-release ]; then
- OS_ID=$(grep "^ID=" /etc/os-release | awk -F= '{print $2}')
+ OS_ID=$(grep "^ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
if [ ! -z "${OS_ID}" ]; then
case ${OS_ID} in
"arch")