161b12b82SJayanth Othayoth#!/bin/bash
261b12b82SJayanth Othayoth#
361b12b82SJayanth Othayoth# config: 2 20
461b12b82SJayanth Othayoth# @brief: Get the inventory information.
561b12b82SJayanth Othayoth#
661b12b82SJayanth Othayoth
7*888a1af9SMarri Devender Rao# shellcheck disable=SC1091
8*888a1af9SMarri Devender Rao. "$DREPORT_INCLUDE"/functions
961b12b82SJayanth Othayoth
1061b12b82SJayanth Othayothdesc="inventory"
1161b12b82SJayanth Othayoth
1261b12b82SJayanth Othayothcommand="busctl call --verbose --no-pager \
1361b12b82SJayanth Othayoth                xyz.openbmc_project.Inventory.Manager \
1461b12b82SJayanth Othayoth                /xyz/openbmc_project/inventory \
1561b12b82SJayanth Othayoth                org.freedesktop.DBus.ObjectManager \
1661b12b82SJayanth Othayoth                GetManagedObjects"
1761b12b82SJayanth Othayoth
1861b12b82SJayanth Othayothfile_name="inventory.log"
1961b12b82SJayanth Othayoth
20*888a1af9SMarri Devender Raoif ! add_cmd_output "$command" "$file_name" "$desc";
21*888a1af9SMarri Devender Raothen
22*888a1af9SMarri Devender Rao    inventory_dir="/var/lib/phosphor-inventory-manager"
23*888a1af9SMarri Devender Rao    if [ -d "$inventory_dir" ]; then
24*888a1af9SMarri Devender Rao        add_copy_file "$inventory_dir" "$desc"
25*888a1af9SMarri Devender Rao    fi
26*888a1af9SMarri Devender Raofi
27