mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-26 13:48:59 +08:00
add deepin and uos distro
This commit is contained in:
parent
9deadc9914
commit
0de2d14a7c
@ -212,6 +212,12 @@ func PlatformInformationWithContext(ctx context.Context) (platform string, famil
|
||||
} else if lsb.ID == `"Cumulus Linux"` {
|
||||
platform = "cumuluslinux"
|
||||
version = lsb.Release
|
||||
} else if lsb.ID == "uos" {
|
||||
platform = "uos"
|
||||
version = lsb.Release
|
||||
} else if lsb.ID == "Deepin" {
|
||||
platform = "Deepin"
|
||||
version = lsb.Release
|
||||
} else {
|
||||
if common.PathExistsWithContents("/usr/bin/raspi-config") {
|
||||
platform = "raspbian"
|
||||
@ -289,7 +295,7 @@ func PlatformInformationWithContext(ctx context.Context) (platform string, famil
|
||||
platform = strings.Trim(platform, `"`)
|
||||
|
||||
switch platform {
|
||||
case "debian", "ubuntu", "linuxmint", "raspbian", "Kylin", "cumuluslinux":
|
||||
case "debian", "ubuntu", "linuxmint", "raspbian", "Kylin", "cumuluslinux", "uos", "Deepin":
|
||||
family = "debian"
|
||||
case "fedora":
|
||||
family = "fedora"
|
||||
|
Loading…
x
Reference in New Issue
Block a user