2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-01 09:07:36 +00:00

For serial and model options, only return the system level information

This commit is contained in:
Victor Hu
2017-06-16 10:49:29 -04:00
parent b888c12291
commit 9de8c1aad1

View File

@@ -967,6 +967,13 @@ sub rinv_response {
next;
}
# SPECIAL CASE: If 'serial' or 'model' is specified, only return the system level information
if ($grep_string eq "serial" or $grep_string eq "model") {
if ($key_url ne "$openbmc_project_url/inventory/system") {
next;
}
}
if ($key_url =~ /\/(cpu\d*)\/(\w+)/) {
$src = "$1 $2";
} else {