mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-23 14:52:27 +00:00
0c4fdf343b
These need to work on legacy-flash boards. Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
19 lines
324 B
Bash
Executable File
19 lines
324 B
Bash
Executable File
#!/bin/ash
|
|
. /etc/ash_functions
|
|
|
|
TRACE "Under /bin/poweroff"
|
|
|
|
# Shut down TPM
|
|
if [ "$CONFIG_TPM" = "y" ]; then
|
|
tpmr shutdown
|
|
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
|