From: Lennart Poettering Date: Tue, 28 Oct 2014 00:49:39 +0000 (+0100) Subject: units: define appropriate job timeout actions when boot or shutdown timeouts are hit X-Git-Tag: v217~40 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3898b80d409ae16b049d46f883bf763417bb4c8a;p=thirdparty%2Fsystemd.git units: define appropriate job timeout actions when boot or shutdown timeouts are hit 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. --- diff --git a/units/basic.target b/units/basic.target index b890d48bbce..228f62c4b13 100644 --- a/units/basic.target +++ b/units/basic.target @@ -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 diff --git a/units/poweroff.target b/units/poweroff.target index 71871033a54..dd92d816cac 100644 --- a/units/poweroff.target +++ b/units/poweroff.target @@ -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 diff --git a/units/reboot.target b/units/reboot.target index dec8f567964..668b98d9e45 100644 --- a/units/reboot.target +++ b/units/reboot.target @@ -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