[Mellanox] Use Debian reboot in Nvidia platform reboot when it is invoked from kdump capture boot (#15701) (#16050)
This commit is contained in:
parent
fb8f6265c0
commit
cd6636d4d2
@ -22,12 +22,23 @@ function ParseArguments() {
|
|||||||
|
|
||||||
function SafePwrCycle() {
|
function SafePwrCycle() {
|
||||||
sync; sync
|
sync; sync
|
||||||
umount -fa > /dev/null 2&>1
|
umount -fa > /dev/null 2>&1
|
||||||
echo 1 > $SYSFS_PWR_CYCLE
|
echo 1 > $SYSFS_PWR_CYCLE
|
||||||
}
|
}
|
||||||
|
|
||||||
ParseArguments "$@"
|
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
|
${FW_UPGRADE_SCRIPT} --upgrade --verbose
|
||||||
EXIT_CODE="$?"
|
EXIT_CODE="$?"
|
||||||
if [[ "${EXIT_CODE}" != "${EXIT_SUCCESS}" ]]; then
|
if [[ "${EXIT_CODE}" != "${EXIT_SUCCESS}" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user