Skip to content

Commit

Permalink
update fast-reboot (#2728)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhli-cisco authored and StormLiangMS committed Mar 19, 2023
1 parent 913bd4b commit 202c04c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ PLATFORM=$(sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
PLATFORM_PLUGIN="${REBOOT_TYPE}_plugin"
LOG_SSD_HEALTH="/usr/local/bin/log_ssd_health"
PLATFORM_FWUTIL_AU_REBOOT_HANDLE="platform_fw_au_reboot_handle"
PLATFORM_REBOOT_PRE_CHECK="platform_reboot_pre_check"
SSD_FW_UPDATE="ssd-fw-upgrade"
SSD_FW_UPDATE_BOOT_OPTION=no
TAG_LATEST=yes
Expand Down Expand Up @@ -179,6 +180,10 @@ function initialize_pre_shutdown()
function request_pre_shutdown()
{
if [ -x ${DEVPATH}/${PLATFORM}/${PLATFORM_REBOOT_PRE_CHECK} ]; then
debug "Requesting platform reboot pre-check ..."
${DEVPATH}/${PLATFORM}/${PLATFORM_REBOOT_PRE_CHECK} ${REBOOT_TYPE}
fi
debug "Requesting pre-shutdown ..."
STATE=$(timeout 5s docker exec syncd /usr/bin/syncd_request_shutdown --pre &> /dev/null; if [[ $? == 124 ]]; then echo "timed out"; fi)
if [[ x"${STATE}" == x"timed out" ]]; then
Expand Down

0 comments on commit 202c04c

Please sign in to comment.