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