[PATCH] Support openEuler
by wangguoquan03@foxmail.com
openEuler is simliar to CentOS,
but the ID is not lower-case string, as below,
NAME="openEuler"
VERSION="24.03 (LTS)"
ID="openEuler"
VERSION_ID="24.03"
PRETTY_NAME="openEuler 24.03 (LTS)"
ANSI_COLOR="0;31"
Signed-off-by: Wang Guoquan <wangguoquan03(a)foxmail.com>
diff --git a/daemon/inspect_fs.ml b/daemon/inspect_fs.ml
index dd13124..5028942 100644
--- a/daemon/inspect_fs.ml
+++ b/daemon/inspect_fs.ml
@@ -380,6 +380,9 @@ and check_package_management { distro; version } =
| Some DISTRO_VOID_LINUX ->
Some PACKAGE_MANAGEMENT_XBPS
+ | Some DISTRO_OPENEULER->
+ Some PACKAGE_MANAGEMENT_DNF
+
| Some DISTRO_OPENMANDRIVA ->
Some PACKAGE_MANAGEMENT_DNF
diff --git a/daemon/inspect_fs_unix.ml b/daemon/inspect_fs_unix.ml
index 2b69079..60ced25 100644
--- a/daemon/inspect_fs_unix.ml
+++ b/daemon/inspect_fs_unix.ml
@@ -157,6 +157,7 @@ and distro_of_os_release_id = function
| "kylin" -> Some DISTRO_KYLIN
| "mageia" -> Some DISTRO_MAGEIA
| "neokylin" -> Some DISTRO_NEOKYLIN
+ | "openEuler" -> Some DISTRO_OPENEULER
| "openmandriva" -> Some DISTRO_OPENMANDRIVA
| "opencloudos" -> Some DISTRO_OPENCLOUDOS
| "opensuse" -> Some DISTRO_OPENSUSE
diff --git a/daemon/inspect_types.ml b/daemon/inspect_types.ml
index f162ada..c9406eb 100644
--- a/daemon/inspect_types.ml
+++ b/daemon/inspect_types.ml
@@ -90,6 +90,7 @@ and distro =
| DISTRO_NEOKYLIN
| DISTRO_NETBSD
| DISTRO_OPENBSD
+ | DISTRO_OPENEULER
| DISTRO_OPENMANDRIVA
| DISTRO_OPENCLOUDOS
| DISTRO_OPENSUSE
@@ -228,6 +229,7 @@ and string_of_distro = function
| DISTRO_NEOKYLIN -> "neokylin"
| DISTRO_NETBSD -> "netbsd"
| DISTRO_OPENBSD -> "openbsd"
+ | DISTRO_OPENEULER -> "openEuler"
| DISTRO_OPENMANDRIVA -> "openmandriva"
| DISTRO_OPENCLOUDOS -> "opencloudos"
| DISTRO_OPENSUSE -> "opensuse"
diff --git a/daemon/inspect_types.mli b/daemon/inspect_types.mli
index c775f9d..2aabe23 100644
--- a/daemon/inspect_types.mli
+++ b/daemon/inspect_types.mli
@@ -97,6 +97,7 @@ and distro =
| DISTRO_NEOKYLIN
| DISTRO_NETBSD
| DISTRO_OPENBSD
+ | DISTRO_OPENEULER
| DISTRO_OPENMANDRIVA
| DISTRO_OPENCLOUDOS
| DISTRO_OPENSUSE
diff --git a/generator/actions_inspection.ml b/generator/actions_inspection.ml
index 33086ab..527f3f0 100644
--- a/generator/actions_inspection.ml
+++ b/generator/actions_inspection.ml
@@ -254,6 +254,10 @@ NetBSD.
OpenBSD.
+=item \"openeuler\"
+
+openEuler.
+
=item \"openmandriva\"
OpenMandriva Lx.