Jayanth Othayoth | 61b12b8 | 2017-11-03 06:09:23 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # config: 2 20 |
| 4 | # @brief: Get the inventory information. |
| 5 | # |
| 6 | |
Marri Devender Rao | 888a1af | 2022-04-12 03:38:19 -0500 | [diff] [blame] | 7 | # shellcheck disable=SC1091 |
| 8 | . "$DREPORT_INCLUDE"/functions |
Jayanth Othayoth | 61b12b8 | 2017-11-03 06:09:23 -0500 | [diff] [blame] | 9 | |
| 10 | desc="inventory" |
| 11 | |
| 12 | command="busctl call --verbose --no-pager \ |
| 13 | xyz.openbmc_project.Inventory.Manager \ |
| 14 | /xyz/openbmc_project/inventory \ |
| 15 | org.freedesktop.DBus.ObjectManager \ |
| 16 | GetManagedObjects" |
| 17 | |
| 18 | file_name="inventory.log" |
| 19 | |
Marri Devender Rao | 888a1af | 2022-04-12 03:38:19 -0500 | [diff] [blame] | 20 | if ! add_cmd_output "$command" "$file_name" "$desc"; |
| 21 | then |
| 22 | inventory_dir="/var/lib/phosphor-inventory-manager" |
| 23 | if [ -d "$inventory_dir" ]; then |
| 24 | add_copy_file "$inventory_dir" "$desc" |
| 25 | fi |
| 26 | fi |