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