[systemd-devel] [PATCH] run systemd-tmpfiles-clean only when we have AC power

Cristian Rodríguez crrodriguez at opensuse.org
Thu Apr 3 11:42:08 PDT 2014


While it is cool to be neat and clean all the time, this
task can wait if we are on battery.
---
 units/systemd-tmpfiles-clean.service.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/units/systemd-tmpfiles-clean.service.in b/units/systemd-tmpfiles-clean.service.in
index a5b5acb..06bb21f 100644
--- a/units/systemd-tmpfiles-clean.service.in
+++ b/units/systemd-tmpfiles-clean.service.in
@@ -16,6 +16,7 @@ ConditionDirectoryNotEmpty=|/usr/lib/tmpfiles.d
 ConditionDirectoryNotEmpty=|/usr/local/lib/tmpfiles.d
 ConditionDirectoryNotEmpty=|/etc/tmpfiles.d
 ConditionDirectoryNotEmpty=|/run/tmpfiles.d
+ConditionACPower=true
 
 [Service]
 Type=oneshot
-- 
1.8.4.5



More information about the systemd-devel mailing list