[E1031] add platform specific reboot command support (#15889) (#16216)

This commit is contained in:
mssonicbld 2023-08-21 06:27:54 +08:00 committed by GitHub
parent 2bafae38d5
commit 32a52a13df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View File

@ -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}

View File

@ -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