Skip to content

Commit

Permalink
[E1031] add platform specific reboot command support (sonic-net#15889) (
Browse files Browse the repository at this point in the history
  • Loading branch information
mssonicbld authored Aug 20, 2023
1 parent 2bafae3 commit 32a52a1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions device/celestica/x86_64-cel_e1031-r0/platform_reboot
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

declare -r CPLD_SETREG_PATH="/sys/bus/platform/devices/e1031.smc/setreg"

sync ; sync
umount -fa > /dev/null 2&>1

# Board level power cycle
echo "0x0113 0xAA" > ${CPLD_SETREG_PATH}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

REBOOT_USER=$(logname)
REBOOT_TIME=$(date)
declare -r REBOOT_CAUSE_FILE="/host/reboot-cause/reboot-cause.txt"

echo "User issued 'reboot' with platform-specific command [User: ${REBOOT_USER}, Time: ${REBOOT_TIME}]" > ${REBOOT_CAUSE_FILE}
sync

0 comments on commit 32a52a1

Please sign in to comment.