[systemd-commits] 4 commits - fixme Makefile.am src/readahead-common.c src/readahead-replay.c units/getty.target units/.gitignore units/systemd-readahead-collect.service.in units/systemd-readahead-done.service.in units/systemd-readahead-done.timer units/systemd-readahead-replay.service.in
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Sep 28 18:12:29 PDT 2010
Makefile.am | 6 +++++-
fixme | 2 ++
src/readahead-common.c | 3 +++
src/readahead-replay.c | 2 ++
units/.gitignore | 1 +
units/getty.target | 3 ---
units/systemd-readahead-collect.service.in | 2 +-
units/systemd-readahead-done.service.in | 20 ++++++++++++++++++++
units/systemd-readahead-done.timer | 19 +++++++++++++++++++
units/systemd-readahead-replay.service.in | 1 -
10 files changed, 53 insertions(+), 6 deletions(-)
New commits:
commit bdb0e14d278199037e74cef8c078f5dcce6a09fe
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Sep 29 03:11:35 2010 +0200
readahead: preload pack file
diff --git a/src/readahead-replay.c b/src/readahead-replay.c
index e22fc04..cb93fae 100644
--- a/src/readahead-replay.c
+++ b/src/readahead-replay.c
@@ -145,6 +145,8 @@ static int replay(const char *root) {
goto finish;
}
+ posix_fadvise(fileno(pack), 0, 0, POSIX_FADV_WILLNEED);
+
if ((inotify_fd = open_inotify()) < 0) {
r = inotify_fd;
goto finish;
commit cf895f30766d381a8fc07cc48cab1039fbff1c2d
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Sep 29 03:03:37 2010 +0200
units: getty.target is pulled in via /lib these days
diff --git a/units/getty.target b/units/getty.target
index 35b32dc..e4435dc 100644
--- a/units/getty.target
+++ b/units/getty.target
@@ -7,6 +7,3 @@
[Unit]
Description=Login Prompts
-
-[Install]
-WantedBy=multi-user.target
commit 43be53513acba2b205fca248ff46cfd3ed7cfda8
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Sep 29 02:54:09 2010 +0200
readahead: make sure /dev/.systemd/readahead exists
diff --git a/src/readahead-common.c b/src/readahead-common.c
index e01ae60..a8f6fb3 100644
--- a/src/readahead-common.c
+++ b/src/readahead-common.c
@@ -145,6 +145,9 @@ ReadaheadShared *shared_get(void) {
int fd;
ReadaheadShared *m = NULL;
+ mkdir("/dev/.systemd", 0755);
+ mkdir("/dev/.systemd/readahead", 0755);
+
if ((fd = open("/dev/.systemd/readahead/shared", O_CREAT|O_RDWR|O_CLOEXEC, 0644)) < 0) {
log_error("Failed to create shared memory segment: %m");
goto finish;
commit c7b508592b28ee1e62350f0d249856811371f631
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Sep 29 02:52:22 2010 +0200
units: properly terminate readahead collection 10s after boot
diff --git a/Makefile.am b/Makefile.am
index b3ab550..0a33c06 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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, at rootlibexecdir\@,$(rootlibexecdir),g' \
-e 's, at SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
-e 's, at SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
+ -e 's, at SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
-e 's, at pkgsysconfdir\@,$(pkgsysconfdir),g' \
-e 's, at pkgdatadir\@,$(pkgdatadir),g' \
-e 's, at systemunitdir\@,$(systemunitdir),g' \
diff --git a/fixme b/fixme
index 3e7f921..e7bf69c 100644
--- 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
diff --git a/units/.gitignore b/units/.gitignore
index 1b5b122..f5a42dd 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 c3fb2e6..6987cd4 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 0000000..d665e45
--- /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 0000000..d144bfa
--- /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 f6ca475..280e720 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
More information about the systemd-commits
mailing list