diff --git a/overlay/inventory/os.cf b/overlay/inventory/os.cf index 4185d5b..a6928db 100644 --- a/overlay/inventory/os.cf +++ b/overlay/inventory/os.cf @@ -130,14 +130,19 @@ amzn_2:: string => "Amazon 2", meta => { "inventory", "attribute_name=OS" }; -@endif any:: - "description" string => "$(sys.os_release[PRETTY_NAME])", - if => isvariable("sys.os_release[PRETTY_NAME]"), - meta => { "inventory", "attribute_name=OS", "derived-from=sys.os_release" }; + "description" + string => "$(sys.os_release[PRETTY_NAME])", + if => and( + strcmp("$(sys.os_name_human)", "Unknown"), + isvariable("sys.os_release[PRETTY_NAME]") + ), + meta => { "inventory", "attribute_name=OS", "derived-from=sys.os_release" }; + darwin:: "product_name" string => execresult("/usr/bin/sw_vers --productName", useshell); "product_version" string => execresult("/usr/bin/sw_vers --productVersion", useshell); "description" string => "$(product_name) $(product_version)", meta => { "inventory", "attribute_name=OS", "derived-from=sw_vers command" }; +@endif }