sudo user option update for BMC execute command
Change-Id: I2ffa020af369d0d62e4b4ca9b73094eab6a76678
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/bmc_ssh_utils.py b/lib/bmc_ssh_utils.py
index 7f7c23f..fdd376f 100755
--- a/lib/bmc_ssh_utils.py
+++ b/lib/bmc_ssh_utils.py
@@ -66,7 +66,7 @@
openbmc_user_type = os.environ.get('USER_TYPE', "") or \
BuiltIn().get_variable_value("${USER_TYPE}", default="")
if openbmc_user_type == 'sudo':
- cmd_buf = 'sudo ' + cmd_buf
+ cmd_buf = 'sudo -i ' + cmd_buf
return grs.execute_ssh_command(cmd_buf, open_connection_args, login_args,
print_out, print_err, ignore_err, fork,
quiet, test_mode, time_out)
diff --git a/lib/openbmc_ffdc_list.py b/lib/openbmc_ffdc_list.py
index 3c6bec7..873f845 100755
--- a/lib/openbmc_ffdc_list.py
+++ b/lib/openbmc_ffdc_list.py
@@ -63,18 +63,16 @@
'PLDM_fru_record.txt': 'pldmtool fru getfrurecordtable>/tmp/PLDM_fru_record.txt 2>&1',
'BMC_pldm_flight_recorder.txt': 'rm -rf /tmp/pldm_flight_recorder; killall -s SIGUSR1 pldmd;'
+ ' sleep 5; cat /tmp/pldm_flight_recorder > /tmp/BMC_pldm_flight_recorder.txt 2>&1;',
- 'OCC_state.txt': 'for i in {0..3};'
+ 'OCC_state.txt': 'echo "OCC state check";for i in {0..3};'
+ ' do (echo /org/open_power/control/occ$i;'
+ ' busctl get-property org.open_power.OCC.Control /org/open_power/control/occ$i'
+ ' org.open_power.OCC.Status OccActive) done > /tmp/OCC_state.txt 2>&1',
'bmcweb_persistent_data.json': 'cat /home/root/bmcweb_persistent_data.json'
+ ' > /tmp/bmcweb_persistent_data.json',
- 'GUARD_list.txt': 'export PDBG_DTB=/var/lib/phosphor-software-manager/pnor/rw/DEVTREE;'
- + 'guard -l > /tmp/GUARD_list.txt 2>&1',
+ 'GUARD_list.txt': 'guard -l > /tmp/GUARD_list.txt 2>&1',
'fan_control_dump.json': 'fanctl dump; cat /tmp/fan_control_dump.json'
+ ' /tmp/fan_control_dump.json 2>&1',
- 'DEVTREE': 'cp /var/lib/phosphor-software-manager/pnor/rw/DEVTREE'
- + ' /tmp/DEVTREE 2>&1',
+ 'DEVTREE': 'cat /var/lib/phosphor-software-manager/pnor/rw/DEVTREE > /tmp/DEVTREE 2>&1',
},
}
# Add file name and corresponding command needed for all Linux distributions