emerg-shutdown: Add shutdown timeout for preventing stuck shutdowns, briefly document feature set and usage

This commit is contained in:
Aaron Rainbolt 2025-07-29 21:16:51 -05:00
parent e42078e90d
commit 1a60da71ed
No known key found for this signature in database
GPG key ID: A709160D73C79109
8 changed files with 257 additions and 26 deletions

View file

@ -6,8 +6,9 @@ Description=Emergency shutdown when boot media is removed
Documentation=https://github.com/Kicksecure/security-misc
[Service]
Type=exec
Type=notify
ExecStart=/usr/libexec/security-misc/emerg-shutdown
NotifyAccess=main
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,18 @@
## Copyright (C) 2025 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.
[Unit]
Description=Forcibly shut down the system if normal shutdown gets stuck
Documentation=https://github.com/Kicksecure/security-misc
Wants=emerg-shutdown.service
After=emerg-shutdown.service
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/usr/libexec/security-misc/ensure-shutdown
ExecStop=bash -c -- 'echo "d" > /run/emerg-shutdown-trigger'
KillMode=process
[Install]
WantedBy=multi-user.target