Skip to content

Commit

Permalink
[Mellanox] Use Debian reboot in Nvidia platform reboot when it is inv…
Browse files Browse the repository at this point in the history
…oked from kdump capture boot (#15701) (#16050)
  • Loading branch information
mssonicbld authored Aug 15, 2023
1 parent fb8f626 commit cd6636d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cd6636d

Please sign in to comment.