Skip to content

Commit

Permalink
Improve verbose version info
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Oct 17, 2023
1 parent 91fe0cd commit 62bfc6c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions support/support_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/essentialkaos/ek/v12/fmtutil"
"github.com/essentialkaos/ek/v12/fsutil"
"github.com/essentialkaos/ek/v12/system"
"github.com/essentialkaos/ek/v12/system/container"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand All @@ -26,13 +27,14 @@ func showOSInfo() {
if err == nil {
fmtutil.Separator(false, "OS INFO")

printInfo(12, "Name", osInfo.Name)
printInfo(12, "Pretty Name", osInfo.PrettyName)
printInfo(12, "Version", osInfo.VersionID)
printInfo(12, "Name", osInfo.ColoredName())
printInfo(12, "Pretty Name", osInfo.ColoredPrettyName())
printInfo(12, "Version", osInfo.Version)
printInfo(12, "ID", osInfo.ID)
printInfo(12, "ID Like", osInfo.IDLike)
printInfo(12, "Version ID", osInfo.VersionID)
printInfo(12, "Version Code", osInfo.VersionCodename)
printInfo(12, "Platform ID", osInfo.PlatformID)
printInfo(12, "CPE", osInfo.CPEName)
}

Expand All @@ -52,11 +54,13 @@ func showOSInfo() {

containerEngine := "No"

switch {
case fsutil.IsExist("/.dockerenv"):
switch container.GetEngine() {
case container.DOCKER:
containerEngine = "Yes (Docker)"
case fsutil.IsExist("/run/.containerenv"):
case container.PODMAN:
containerEngine = "Yes (Podman)"
case container.LXC:
containerEngine = "Yes (LXC)"
}

fmtc.NewLine()
Expand Down

0 comments on commit 62bfc6c

Please sign in to comment.