1#!/bin/bash 2# 3# config: 2 20 4# @brief: Get the inventory information. 5# 6 7# shellcheck disable=SC1091 8. "$DREPORT_INCLUDE"/functions 9 10desc="inventory" 11 12command="busctl call --verbose --no-pager \ 13 xyz.openbmc_project.Inventory.Manager \ 14 /xyz/openbmc_project/inventory \ 15 org.freedesktop.DBus.ObjectManager \ 16 GetManagedObjects" 17 18file_name="inventory.log" 19 20if ! add_cmd_output "$command" "$file_name" "$desc"; 21then 22 inventory_dir="/var/lib/phosphor-inventory-manager" 23 if [ -d "$inventory_dir" ]; then 24 add_copy_file "$inventory_dir" "$desc" 25 fi 26fi 27