Marri Devender Rao | 7d3fced | 2022-04-27 05:19:44 -0500 | [diff] [blame] | 1 | #!/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 |
| 11 | file_name="settings.log" |
| 12 | |
| 13 | desc="settings" |
| 14 | command="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 |
| 21 | if ! add_cmd_output "$command" "$file_name" "$desc"; |
| 22 | then |
| 23 | settings_dir="/var/lib/phosphor-settings-manager/settings" |
| 24 | if [ -d "$settings_dir" ]; then |
| 25 | add_copy_file "$settings_dir" "$desc" |
| 26 | fi |
| 27 | fi |