chiark / gitweb /
units: set TimeoutSec on some oneshot services
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 31 Jan 2015 04:54:21 +0000 (23:54 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 1 Feb 2015 17:44:03 +0000 (12:44 -0500)
Services which are not crucial to system bootup, and have Type=oneshot
can effectively "hang" the system if they fail to complete for whatever
reason. To allow the boot to continue, kill them after a timeout.

In case of systemd-journal-flush the flush will continue in the background,
and in the other two cases the job will be aborted, but this should not
result in any permanent problem.

units/systemd-backlight@.service.in
units/systemd-journal-catalog-update.service.in
units/systemd-journal-flush.service.in

index ecf3de48d78ba59da775e0f72e0492463f59991c..19d640bfb04fb5ab6b39ea8bfb6e01e2085b7676 100644 (file)
@@ -19,3 +19,4 @@ Type=oneshot
 RemainAfterExit=yes
 ExecStart=@rootlibexecdir@/systemd-backlight load %i
 ExecStop=@rootlibexecdir@/systemd-backlight save %i
+TimeoutSec=2min
index bfa5e6b43510b856e9f70a37d565a8947208580f..9667310920b8d563132923fc0b0299e9d4cd1552 100644 (file)
@@ -18,3 +18,4 @@ ConditionNeedsUpdate=/etc
 Type=oneshot
 RemainAfterExit=yes
 ExecStart=@rootbindir@/journalctl --update-catalog
+TimeoutSec=2min
index 98c91b4bc5c50f9ce281117554cbb13c025b8137..53a6f30cfd87e6bbcc2044f9bd7ee8dd31916a6a 100644 (file)
@@ -19,3 +19,4 @@ RequiresMountsFor=/var/log/journal
 ExecStart=@rootbindir@/journalctl --flush
 Type=oneshot
 RemainAfterExit=yes
+TimeoutSec=2min