]> err.no Git - systemd/commitdiff
units: properly terminate readahead collection 10s after boot
authorLennart Poettering <lennart@poettering.net>
Wed, 29 Sep 2010 00:52:22 +0000 (02:52 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 29 Sep 2010 00:55:36 +0000 (02:55 +0200)
Makefile.am
fixme
units/.gitignore
units/systemd-readahead-collect.service.in
units/systemd-readahead-done.service.in [new file with mode: 0644]
units/systemd-readahead-done.timer [new file with mode: 0644]
units/systemd-readahead-replay.service.in

index b3ab55065a8e21f59d2ea55dc30b2cae30cbacc9..0a33c0635b150a1948bb4f4820bcfc4824d90839 100644 (file)
@@ -191,7 +191,8 @@ dist_systemunit_DATA = \
        units/bluetooth.target \
        units/smartcard.target \
        units/tmpwatch.service \
-       units/tmpwatch.timer
+       units/tmpwatch.timer \
+       units/systemd-readahead-done.timer
 
 nodist_systemunit_DATA = \
        units/sysinit.target \
@@ -213,6 +214,7 @@ nodist_systemunit_DATA = \
        units/systemd-random-seed-load.service \
        units/systemd-readahead-collect.service \
        units/systemd-readahead-replay.service \
+       units/systemd-readahead-done.service \
        units/systemd-tmpfiles.service \
        units/syslog.target
 
@@ -243,6 +245,7 @@ EXTRA_DIST = \
        units/systemd-random-seed-load.service.in \
        units/systemd-readahead-collect.service.in \
        units/systemd-readahead-replay.service.in \
+       units/systemd-readahead-done.service.in \
        units/systemd-tmpfiles.service.in \
        units/syslog.target.in \
        units/session/exit.service.in \
@@ -830,6 +833,7 @@ SED_PROCESS = \
        $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
                -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
                -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
+               -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
                -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
                -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
                -e 's,@systemunitdir\@,$(systemunitdir),g' \
diff --git a/fixme b/fixme
index 3e7f921d92af5a006e8ab0d0f04ec7be2b130955..e7bf69c9f4ffaf4a99a610bfaf41bc1063e6648d 100644 (file)
--- a/fixme
+++ b/fixme
@@ -9,6 +9,8 @@ v11:
 
 * emergency.service should start default.target after C-d. synchronize from fedora's initscripts package
 
+* verify ordering of random-seed-load and base.target!
+
 later:
 
 * do not throw error when .service file is linked to /dev/null
index 1b5b12256dbd0afcdc8b50168aa4b0895eec38e6..f5a42dd53e31deaf7ef30d62ff0772dd688fc9ec 100644 (file)
@@ -1,3 +1,4 @@
+systemd-readahead-done.service
 systemd-tmpfiles.service
 systemd-readahead-collect.service
 systemd-readahead-replay.service
index c3fb2e6447e207b4d87c1061844d181d5e29b6b9..6987cd493c7c0c4420f8af318ff4d3c57025a838 100644 (file)
@@ -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 (file)
index 0000000..d665e45
--- /dev/null
@@ -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 (file)
index 0000000..d144bfa
--- /dev/null
@@ -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
index f6ca475ae74b8713460d5c9758c4de7d60118f71..280e7204c9e8ac6ac789201e89209d311a9c1f8f 100644 (file)
@@ -18,4 +18,3 @@ RemainAfterExit=yes
 
 [Install]
 WantedBy=default.target
-Also=systemd-readahead-collect.service