aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-compliance/lynis/files/0001-osdetection-add-OpenEmbedded-and-Poky.patch
blob: d365ec11b8aa7c29b20714a1d6de3cff3dc07d53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From 4b1de197ee0dd259cc05d5faf7fd38b580d841d2 Mon Sep 17 00:00:00 2001
From: Armin Kuster <akuster808@gmail.com>
Date: Tue, 2 May 2023 16:22:13 -0400
Subject: [PATCH] osdetection: add OpenEmbedded and Poky

Signed-off-by: Armin Kuster <akuster@mvista.com>

Upstream-Status: Pending
https://github.com/CISOfy/lynis/pull/1390

Signed-off-by: Armin Kuster <akuster808@gmail.com>

---
 include/osdetection | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/osdetection b/include/osdetection
index 989b1b3..e5974e5 100644
--- a/include/osdetection
+++ b/include/osdetection
@@ -308,6 +308,12 @@
                             OS_REDHAT_OR_CLONE=1
                             OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
                         ;;
+                        "nodistro")
+                            LINUX_VERSION="openembedded"
+                            OS_NAME="OpenEmbedded"
+                            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 '"')
+                        ;;
                         "opensuse-tumbleweed")
                             LINUX_VERSION="openSUSE Tumbleweed"
                             # It's rolling release but has a snapshot version (the date of the snapshot)
@@ -330,6 +336,14 @@
                             OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
                             OS_VERSION_FULL=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
                         ;;
+                        "poky")
+                            LINUX_VERSION="Poky"
+                            OS_NAME="openembedded"
+                            LINUX_VERSION_LIKE="openembedded"
+                            OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+                            OS_VERSION_FULL=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+
+                        ;;
                         "pop")
                             LINUX_VERSION="Pop!_OS"
                             LINUX_VERSION_LIKE="Ubuntu"
-- 
2.25.1