mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-28 13:48:49 +08:00
Recognize Cumulus Linux distro
Add Cumulus Linux and Kylin to debian family
This commit is contained in:
parent
b51f72ebfb
commit
43566581f0
@ -210,6 +210,9 @@ func PlatformInformationWithContext(ctx context.Context) (platform string, famil
|
|||||||
} else if lsb.ID == "Kylin" {
|
} else if lsb.ID == "Kylin" {
|
||||||
platform = "Kylin"
|
platform = "Kylin"
|
||||||
version = lsb.Release
|
version = lsb.Release
|
||||||
|
} else if lsb.ID == "\"Cumulus Linux\"" {
|
||||||
|
platform = "cumuluslinux"
|
||||||
|
version = lsb.Release
|
||||||
} else {
|
} else {
|
||||||
if common.PathExistsWithContents("/usr/bin/raspi-config") {
|
if common.PathExistsWithContents("/usr/bin/raspi-config") {
|
||||||
platform = "raspbian"
|
platform = "raspbian"
|
||||||
@ -287,7 +290,7 @@ func PlatformInformationWithContext(ctx context.Context) (platform string, famil
|
|||||||
platform = strings.Trim(platform, `"`)
|
platform = strings.Trim(platform, `"`)
|
||||||
|
|
||||||
switch platform {
|
switch platform {
|
||||||
case "debian", "ubuntu", "linuxmint", "raspbian":
|
case "debian", "ubuntu", "linuxmint", "raspbian", "Kylin", "cumuluslinux":
|
||||||
family = "debian"
|
family = "debian"
|
||||||
case "fedora":
|
case "fedora":
|
||||||
family = "fedora"
|
family = "fedora"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user