From 36b062a784fee6eac842df32dcfba977fd289d4f Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Tue, 27 Feb 2024 14:27:18 -0600 Subject: [PATCH] fixup OS for macos --- overlay/inventory/os.cf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/overlay/inventory/os.cf b/overlay/inventory/os.cf index 0226408..4185d5b 100644 --- a/overlay/inventory/os.cf +++ b/overlay/inventory/os.cf @@ -135,4 +135,9 @@ 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" }; +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" }; }