From 43566581f00d5cd84a0ccab1d80e83d3abf050ac Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Mon, 24 Oct 2022 01:11:18 -0400 Subject: [PATCH 1/2] Recognize Cumulus Linux distro Add Cumulus Linux and Kylin to debian family --- host/host_linux.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/host/host_linux.go b/host/host_linux.go index 9dc63322..7167e331 100644 --- a/host/host_linux.go +++ b/host/host_linux.go @@ -210,6 +210,9 @@ func PlatformInformationWithContext(ctx context.Context) (platform string, famil } else if lsb.ID == "Kylin" { platform = "Kylin" version = lsb.Release + } else if lsb.ID == "\"Cumulus Linux\"" { + platform = "cumuluslinux" + version = lsb.Release } else { if common.PathExistsWithContents("/usr/bin/raspi-config") { platform = "raspbian" @@ -287,7 +290,7 @@ func PlatformInformationWithContext(ctx context.Context) (platform string, famil platform = strings.Trim(platform, `"`) switch platform { - case "debian", "ubuntu", "linuxmint", "raspbian": + case "debian", "ubuntu", "linuxmint", "raspbian", "Kylin", "cumuluslinux": family = "debian" case "fedora": family = "fedora" From 02660eaf7c8c7ed1a369a9a3b32c71ea99029bd6 Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Fri, 10 Mar 2023 09:41:18 -0500 Subject: [PATCH 2/2] Update host/host_linux.go Use a raw string instead of escaped quotes. Co-authored-by: shirou --- host/host_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/host_linux.go b/host/host_linux.go index 7167e331..7f96bfae 100644 --- a/host/host_linux.go +++ b/host/host_linux.go @@ -210,7 +210,7 @@ func PlatformInformationWithContext(ctx context.Context) (platform string, famil } else if lsb.ID == "Kylin" { platform = "Kylin" version = lsb.Release - } else if lsb.ID == "\"Cumulus Linux\"" { + } else if lsb.ID == `"Cumulus Linux"` { platform = "cumuluslinux" version = lsb.Release } else {