Skip to content

Commit

Permalink
Merge pull request #2893 from olehermanse/3.21-pretty-name
Browse files Browse the repository at this point in the history
CFE-4342: When failing to detect platform, inventory attribute "OS" now defaults to PRETTY_NAME from os-release as a fallback (3.21)
  • Loading branch information
olehermanse authored May 29, 2024
2 parents d093652 + e28c450 commit 2f64e28
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions inventory/os.cf
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,14 @@ amzn_2::
string => "Amazon 2",
meta => { "inventory", "attribute_name=OS" };

any::
"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" };

@endif
}

0 comments on commit 2f64e28

Please sign in to comment.