1*0294370cSMarri Devender Rao#!/usr/bin/env bash
2*0294370cSMarri Devender Rao#
3*0294370cSMarri Devender Rao# config: 234 20
4*0294370cSMarri Devender Rao# @brief: Get the bios information.
5*0294370cSMarri Devender Rao#
6*0294370cSMarri Devender Rao
7*0294370cSMarri Devender Rao# shellcheck disable=SC1091
8*0294370cSMarri Devender Rao. "$DREPORT_INCLUDE"/functions
9*0294370cSMarri Devender Rao
10*0294370cSMarri Devender Raofile_name="bios.log"
11*0294370cSMarri Devender Raodesc="bios"
12*0294370cSMarri Devender Raocommand="busctl call --verbose --no-pager \
13*0294370cSMarri Devender Rao                xyz.openbmc_project.BIOSConfigManager \
14*0294370cSMarri Devender Rao                / \
15*0294370cSMarri Devender Rao                org.freedesktop.DBus.ObjectManager \
16*0294370cSMarri Devender Rao                GetManagedObjects"
17*0294370cSMarri Devender Rao
18*0294370cSMarri Devender Rao#if busctl commands fail capture persistent data
19*0294370cSMarri Devender Raoif ! add_cmd_output "$command" "$file_name" "$desc";
20*0294370cSMarri Devender Raothen
21*0294370cSMarri Devender Rao    settings_dir="/var/lib/bios-settings-manager"
22*0294370cSMarri Devender Rao    if [ -d "$settings_dir" ]; then
23*0294370cSMarri Devender Rao        add_copy_file "$settings_dir" "$desc"
24*0294370cSMarri Devender Rao    fi
25*0294370cSMarri Devender Raofi
26