Skip to content

Commit

Permalink
Craigs-MacBook-Pro.local
Browse files Browse the repository at this point in the history
  • Loading branch information
craigcomstock committed Feb 28, 2024
1 parent f1606e5 commit e88932b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions overlay/inventory/os.cf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit e88932b

Please sign in to comment.