Skip to content

Commit 3e448be

Browse files
committed
update check for bmc in host side
Signed-off-by: Ben Levi <belevi@nvidia.com>
1 parent d72f672 commit 3e448be

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

scripts/generate_dump

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,13 +2201,7 @@ save_log_files() {
22012201
# 0 if BMC is supported, 1 otherwise
22022202
###############################################################################
22032203
is_bmc_supported() {
2204-
local platform=$(python3 -c "from sonic_py_common import device_info; print(device_info.get_platform())")
2205-
# Check if the required file exists
2206-
if [ ! -f /usr/share/sonic/device/$platform/bmc.json ]; then
2207-
return 1
2208-
else
2209-
return 0
2210-
fi
2204+
python3 -c "from sonic_py_common import device_info; import sys; sys.exit(0 if (device_info.is_switch_host() and device_info.get_bmc_data()) else 1)"
22112205
}
22122206

22132207
###############################################################################

0 commit comments

Comments
 (0)