From 202c04cd77cf1121c6900a0bb1fd1ab244b4bfa6 Mon Sep 17 00:00:00 2001 From: jhli-cisco <93410383+jhli-cisco@users.noreply.github.com> Date: Wed, 8 Mar 2023 18:03:50 -0800 Subject: [PATCH] update fast-reboot (#2728) --- scripts/fast-reboot | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/fast-reboot b/scripts/fast-reboot index 9891eb3cc6..e2ddfb75ab 100755 --- a/scripts/fast-reboot +++ b/scripts/fast-reboot @@ -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 @@ -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