Skip to content

Commit 99673bc

Browse files
authored
[reboot] Add platform-specific reboot cause update hook (sonic-net#1454)
#### What I did The S6000 devices, the cold reboot is abrupt and it is likely to cause issues which will cause the device to land into EFI shell. Hence the platform reboot will happen after graceful unmount of all the filesystems as in S6100. #### How I did it In reboot script, if platform-specific reboot cause update script exists, run it
1 parent 2f6e36e commit 99673bc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/reboot

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
DEVPATH="/usr/share/sonic/device"
33
PLAT_REBOOT="platform_reboot"
4+
PLATFORM_UPDATE_REBOOT_CAUSE="platform_update_reboot_cause"
45
REBOOT_CAUSE_FILE="/host/reboot-cause/reboot-cause.txt"
56
REBOOT_TIME=$(date)
67

@@ -167,6 +168,11 @@ if [ -x ${DEVPATH}/${PLATFORM}/${SSD_FW_UPDATE} ]; then
167168
${DEVPATH}/${PLATFORM}/${SSD_FW_UPDATE} ${REBOOT_TYPE}
168169
fi
169170

171+
if [ -x ${DEVPATH}/${PLATFORM}/${PLATFORM_UPDATE_REBOOT_CAUSE} ]; then
172+
debug "updating reboot cause for ${PLATFORM}"
173+
${DEVPATH}/${PLATFORM}/${PLATFORM_UPDATE_REBOOT_CAUSE}
174+
fi
175+
170176
if [ -x ${DEVPATH}/${PLATFORM}/${PLAT_REBOOT} ]; then
171177
VERBOSE=yes debug "Rebooting with platform ${PLATFORM} specific tool ..."
172178
exec ${DEVPATH}/${PLATFORM}/${PLAT_REBOOT} $@

0 commit comments

Comments
 (0)