diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot index b2188fde6f..9b68790498 100755 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot @@ -21,13 +21,24 @@ function ParseArguments() { } function SafePwrCycle() { - sync ; sync - umount -fa > /dev/null 2&>1 + sync; sync + umount -fa > /dev/null 2>&1 echo 1 > $SYSFS_PWR_CYCLE } ParseArguments "$@" +# Reboot immediately if the kdump capture kernel is running +VMCORE_FILE=/proc/vmcore +if [ -s $VMCORE_FILE ]; then + sync; sync + umount -fa > /dev/null 2>&1 + + # Run Debian reboot because the platform reboot isn't available + /sbin/reboot +fi + + ${FW_UPGRADE_SCRIPT} --upgrade --verbose EXIT_CODE="$?" if [[ "${EXIT_CODE}" != "${EXIT_SUCCESS}" ]]; then