-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
platformVersion on elementary OS #224
Comments
I think psutil has no function which can get platform information. I don't know elementary OS but if it has |
Ah sorry, i used the python platform.linux_distribution function. /etc/debian_version returns different informations than lsb_release -a so ` jessie/sid ~ lsb_release -a No LSB modules are available. |
I read python source code and found it's read
or something and these contents? Thanks. |
Nope, i think this would be enough. |
/etc/lsb-release
/etc/os-release
|
WIP diff --git a/host/host_linux.go b/host/host_linux.go
index 02ff554..b4a7795 100644
--- a/host/host_linux.go
+++ b/host/host_linux.go
@@ -261,13 +261,14 @@ func PlatformInformationWithContext(ctx context.Context) (platform string, famil
version = getSlackwareVersion(contents)
}
} else if common.PathExists(common.HostEtc("debian_version")) {
- if lsb.ID == "Ubuntu" {
+ switch lsb.ID {
+ case "Ubuntu", "LinuxMint":
platform = "ubuntu"
version = lsb.Release
- } else if lsb.ID == "LinuxMint" {
- platform = "linuxmint"
+ case "elementary":
+ platform = "elementary" // not sure about this
version = lsb.Release
- } else {
+ default:
if common.PathExists("/usr/bin/raspi-config") {
platform = "raspbian"
} else { |
Platform version and Platform Family gives different informations form psutil in python.
psutil: "elementary OS" 0.4 loki
goposutil: debian jessie
psutil tells me the truths. :)
The text was updated successfully, but these errors were encountered: