diff --git a/scripts/reboot b/scripts/reboot index 889f4c4bd547..8b1f9d60c328 100755 --- a/scripts/reboot +++ b/scripts/reboot @@ -1,6 +1,7 @@ #!/bin/bash DEVPATH="/usr/share/sonic/device" PLAT_REBOOT="platform_reboot" +PLATFORM_UPDATE_REBOOT_CAUSE="platform_update_reboot_cause" REBOOT_CAUSE_FILE="/host/reboot-cause/reboot-cause.txt" REBOOT_TIME=$(date) @@ -167,6 +168,11 @@ if [ -x ${DEVPATH}/${PLATFORM}/${SSD_FW_UPDATE} ]; then ${DEVPATH}/${PLATFORM}/${SSD_FW_UPDATE} ${REBOOT_TYPE} fi +if [ -x ${DEVPATH}/${PLATFORM}/${PLATFORM_UPDATE_REBOOT_CAUSE} ]; then + debug "updating reboot cause for ${PLATFORM}" + ${DEVPATH}/${PLATFORM}/${PLATFORM_UPDATE_REBOOT_CAUSE} +fi + if [ -x ${DEVPATH}/${PLATFORM}/${PLAT_REBOOT} ]; then VERBOSE=yes debug "Rebooting with platform ${PLATFORM} specific tool ..." exec ${DEVPATH}/${PLATFORM}/${PLAT_REBOOT} $@