summaryrefslogtreecommitdiff
path: root/cloudinit/util.py
diff options
context:
space:
mode:
authorsshedi <53473811+sshedi@users.noreply.github.com>2021-06-18 22:23:44 +0530
committerGitHub <noreply@github.com>2021-06-18 11:53:44 -0500
commit35aa9db6f8e2ba05d366776c0e8d97f52217e930 (patch)
treee3c14005ed078aea1cc0425ec8bea3db9f16602e /cloudinit/util.py
parentf5a244960c3f1591d022c081d816bc9604512629 (diff)
downloadvyos-cloud-init-35aa9db6f8e2ba05d366776c0e8d97f52217e930.tar.gz
vyos-cloud-init-35aa9db6f8e2ba05d366776c0e8d97f52217e930.zip
Add support for VMware PhotonOS (#909)
Also added a new (currently experimental) systemd-networkd renderer, and includes a small refactor to cc_resolv_conf.py to support the resolved.conf used by systemd-resolved.
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r--cloudinit/util.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py
index f95dc435..7995c6c8 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -483,6 +483,8 @@ def get_linux_distro():
# which will include both version codename and architecture
# on all distributions.
flavor = platform.machine()
+ elif distro_name == 'photon':
+ flavor = os_release.get('PRETTY_NAME', '')
else:
flavor = os_release.get('VERSION_CODENAME', '')
if not flavor:
@@ -531,7 +533,7 @@ def system_info():
linux_dist = info['dist'][0].lower()
if linux_dist in (
'almalinux', 'alpine', 'arch', 'centos', 'debian', 'fedora',
- 'rhel', 'rocky', 'suse'):
+ 'photon', 'rhel', 'rocky', 'suse'):
var = linux_dist
elif linux_dist in ('ubuntu', 'linuxmint', 'mint'):
var = 'ubuntu'