45 lines
1.4 KiB
Diff
45 lines
1.4 KiB
Diff
From a6fd6ef3af0361c860de62d804dd584052f8a563 Mon Sep 17 00:00:00 2001
|
|
From: sxt1001 <shixuantong1@huawei.com>
|
|
Date: Mon, 12 Dec 2022 23:43:59 +0800
|
|
Subject: [PATCH] Fix the distro.osfamily output problem in the openEuler
|
|
system. (#1895)
|
|
|
|
LP: #1999042
|
|
---
|
|
cloudinit/distros/__init__.py | 3 ++-
|
|
cloudinit/distros/openEuler.py | 4 +++-
|
|
2 files changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py
|
|
index d91aab2..4ab7ae3 100755
|
|
--- a/cloudinit/distros/__init__.py
|
|
+++ b/cloudinit/distros/__init__.py
|
|
@@ -50,8 +50,9 @@ OSFAMILIES = {
|
|
'freebsd': ['freebsd'],
|
|
'gentoo': ['gentoo'],
|
|
'redhat': ['almalinux', 'amazon', 'centos', 'cloudlinux', 'eurolinux',
|
|
- 'fedora', 'openeuler', 'photon', 'rhel', 'rocky', 'virtuozzo'],
|
|
+ 'fedora', 'photon', 'rhel', 'rocky', 'virtuozzo'],
|
|
'suse': ['opensuse', 'sles'],
|
|
+ "openEuler": ["openEuler"],
|
|
}
|
|
|
|
LOG = logging.getLogger(__name__)
|
|
diff --git a/cloudinit/distros/openEuler.py b/cloudinit/distros/openEuler.py
|
|
index edb3165..a4e8757 100644
|
|
--- a/cloudinit/distros/openEuler.py
|
|
+++ b/cloudinit/distros/openEuler.py
|
|
@@ -4,6 +4,8 @@ from cloudinit.distros import rhel
|
|
|
|
|
|
class Distro(rhel.Distro):
|
|
- pass
|
|
+ def __init__(self, name, cfg, paths):
|
|
+ super(Distro, self).__init__(name, cfg, paths)
|
|
+ self.osfamily = "openEuler"
|
|
|
|
# vi: ts=4 expandtab
|
|
--
|
|
2.33.0
|
|
|