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

@ -17,3 +17,17 @@
## The default key sequence triggers a shutdown when Ctrl+Alt+Delete is
## pressed, allowing the use of either the left or right Ctrl and Alt keys.
EMERG_SHUTDOWN_KEYS="KEY_LEFTCTRL|KEY_RIGHTCTRL,KEY_LEFTALT|KEY_RIGHTALT,KEY_DELETE"
## Set the maximum number of seconds shutdown can take. If shutdown gets stuck
## for longer than this, the system will forcibly power down.
##
## NOTE: This requires ensure-shutdown.service to be enabled, which is not
## done by default. Enabling ensure-shutdown.service will cause shutdown to
## always take at least as long as systemd's DefaultTimeoutStopSec (which by
## default is 90 seconds). If you are going to enable ensure-shutdown.service,
## it is highly recommended to set DefaultTimeoutStopSec to a much smaller
## value, such as 5 seconds. The maximum shutdown time set here should be at
## least 10 seconds *longer* than DefaultTimeoutStopSec, to give normal
## shutdown a chance to actually succeed before forcibly shutting down the
## system.
ENSURE_SHUTDOWN_TIMEOUT=30