summaryrefslogtreecommitdiff
path: root/units
diff options
context:
space:
mode:
Diffstat (limited to 'units')
-rw-r--r--units/.gitignore1
-rw-r--r--units/systemd-readahead-collect.service.in2
-rw-r--r--units/systemd-readahead-done.service.in20
-rw-r--r--units/systemd-readahead-done.timer19
-rw-r--r--units/systemd-readahead-replay.service.in1
5 files changed, 41 insertions, 2 deletions
diff --git a/units/.gitignore b/units/.gitignore
index 1b5b12256d..f5a42dd53e 100644
--- a/units/.gitignore
+++ b/units/.gitignore
@@ -1,3 +1,4 @@
+systemd-readahead-done.service
systemd-tmpfiles.service
systemd-readahead-collect.service
systemd-readahead-replay.service
diff --git a/units/systemd-readahead-collect.service.in b/units/systemd-readahead-collect.service.in
index c3fb2e6447..6987cd493c 100644
--- a/units/systemd-readahead-collect.service.in
+++ b/units/systemd-readahead-collect.service.in
@@ -8,6 +8,7 @@
[Unit]
Description=Collect Read-Ahead Data
DefaultDependencies=no
+Wants=systemd-readahead-done.timer
Conflicts=shutdown.target
Before=shutdown.target
@@ -18,4 +19,3 @@ RemainAfterExit=yes
[Install]
WantedBy=default.target
-Also=systemd-readahead-replay.service
diff --git a/units/systemd-readahead-done.service.in b/units/systemd-readahead-done.service.in
new file mode 100644
index 0000000000..d665e45f24
--- /dev/null
+++ b/units/systemd-readahead-done.service.in
@@ -0,0 +1,20 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Stop Read-Ahead Data Collection
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=default.target
+Before=shutdown.target
+
+[Service]
+Type=oneshot
+ExecStart=@SYSTEMD_NOTIFY@ --readahead=done
+
+[Install]
+Also=systemd-readahead-collect.service
diff --git a/units/systemd-readahead-done.timer b/units/systemd-readahead-done.timer
new file mode 100644
index 0000000000..d144bfaece
--- /dev/null
+++ b/units/systemd-readahead-done.timer
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Stop Read-Ahead Data Collection 10s After Completed Startup
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=default.target
+Before=shutdown.target
+
+[Timer]
+OnActiveSec=10s
+
+[Install]
+Also=systemd-readahead-collect.service
diff --git a/units/systemd-readahead-replay.service.in b/units/systemd-readahead-replay.service.in
index f6ca475ae7..280e7204c9 100644
--- a/units/systemd-readahead-replay.service.in
+++ b/units/systemd-readahead-replay.service.in
@@ -18,4 +18,3 @@ RemainAfterExit=yes
[Install]
WantedBy=default.target
-Also=systemd-readahead-collect.service