units: define appropriate job timeout actions when boot or shutdown timeouts are hit
authorLennart Poettering <lennart@poettering.net>
Tue, 28 Oct 2014 00:49:39 +0000 (01:49 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 28 Oct 2014 01:19:55 +0000 (02:19 +0100)
Using the new JobTimeoutAction= setting make sure we power off the
machine after basic.target is queued for longer than 15min but not
executed. Similar, if poweroff.target is queued for longer than 30min
but does not complete, forcibly turn off the system. Similar, if
reboot.target is queued for longer than 30min but does not complete,
forcibly reboot the system.

units/basic.target
units/poweroff.target
units/reboot.target

index b890d48..228f62c 100644 (file)
@@ -11,3 +11,5 @@ Documentation=man:systemd.special(7)
 Requires=sysinit.target
 Wants=sockets.target timers.target paths.target slices.target
 After=sysinit.target sockets.target timers.target paths.target slices.target
+JobTimeoutSec=15min
+JobTimeoutAction=poweroff-force
index 7187103..dd92d81 100644 (file)
@@ -12,6 +12,8 @@ DefaultDependencies=no
 Requires=systemd-poweroff.service
 After=systemd-poweroff.service
 AllowIsolate=yes
+JobTimeoutSec=30min
+JobTimeoutAction=poweroff-force
 
 [Install]
 Alias=ctrl-alt-del.target
index dec8f56..668b98d 100644 (file)
@@ -12,6 +12,8 @@ DefaultDependencies=no
 Requires=systemd-reboot.service
 After=systemd-reboot.service
 AllowIsolate=yes
+JobTimeoutSec=30min
+JobTimeoutAction=reboot-force
 
 [Install]
 Alias=ctrl-alt-del.target