mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-30 09:48:56 +00:00
a1c13ff132
Signed-off-by: Markus Meissner <coder@safemailbox.de>
24 lines
492 B
Bash
Executable File
24 lines
492 B
Bash
Executable File
#!/bin/ash
|
|
. /etc/ash_functions
|
|
|
|
TRACE "Under /bin/poweroff"
|
|
|
|
# Shut down TPM
|
|
if [ "$CONFIG_TPM" = "y" ]; then
|
|
tpmr shutdown
|
|
fi
|
|
|
|
# Run special EC-based poweroff for Nitropad-Nxx
|
|
if [ "$CONFIG_BOARD" = "nitropad-nv41" ] || [ "$CONFIG_BOARD" = "nitropad-ns50" ]; then
|
|
/bin/nitropad-shutdown.sh
|
|
fi
|
|
|
|
# Sync all mounted filesystems
|
|
echo s > /proc/sysrq-trigger
|
|
|
|
# Remount all mounted filesystems in read-only mode
|
|
echo u > /proc/sysrq-trigger
|
|
|
|
# Shut off the system
|
|
echo o > /proc/sysrq-trigger
|