Skip to content

Commit

Permalink
Enable HW watchdog before fast-reboot (#977)
Browse files Browse the repository at this point in the history
  • Loading branch information
sujinmkang authored and abdosi committed Aug 9, 2020
1 parent 28ac187 commit 004a034
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ STRICT=no
REBOOT_METHOD="/sbin/kexec -e"
ASSISTANT_IP_LIST=""
ASSISTANT_SCRIPT="/usr/bin/neighbor_advertiser"
WATCHDOG_UTIL="/usr/bin/watchdogutil"
DEVPATH="/usr/share/sonic/device"
PLATFORM=$(sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
PLATFORM_PLUGIN="${REBOOT_TYPE}_plugin"
Expand Down Expand Up @@ -593,6 +594,12 @@ if [ -x ${DEVPATH}/${PLATFORM}/${PLATFORM_PLUGIN} ]; then
${DEVPATH}/${PLATFORM}/${PLATFORM_PLUGIN}
fi
# Enable Watchdog Timer
if [ -x ${WATCHDOG_UTIL} ]; then
debug "Enabling Watchdog before ${REBOOT_TYPE}"
${WATCHDOG_UTIL} arm
fi
# Reboot: explicity call Linux native reboot under sbin
debug "Rebooting with ${REBOOT_METHOD} to ${NEXT_SONIC_IMAGE} ..."
exec ${REBOOT_METHOD}
Expand Down

0 comments on commit 004a034

Please sign in to comment.