From e88932b5d76b5752e6ddaa91a14022ac1eb309a0 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Wed, 28 Feb 2024 08:50:57 -0600 Subject: [PATCH] Craigs-MacBook-Pro.local --- overlay/inventory/os.cf | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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 }