summaryrefslogtreecommitdiff
path: root/units
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-06-13 13:10:30 +0200
committerLennart Poettering <lennart@poettering.net>2014-06-13 13:26:32 +0200
commitecde7065f7b11a7a226d2f7b0e90e998a6347a59 (patch)
tree50fc81d63a475f851c935cf6f5b1a10ab77fa227 /units
parenta55654d598c78f8e084aa6a18fec6eff900c9aed (diff)
units: rebuild /etc/passwd, the udev hwdb and the journal catalog files on boot
Only when necessary of course, nicely guarded with the new ConditionNeedsUpdate= condition we added.
Diffstat (limited to 'units')
-rw-r--r--units/.gitignore3
-rw-r--r--units/systemd-journal-catalog-update.service.in22
-rw-r--r--units/systemd-networkd.service.in2
-rw-r--r--units/systemd-sysusers.service.in22
-rw-r--r--units/systemd-timesyncd.service.in2
-rw-r--r--units/systemd-tmpfiles-setup.service.in2
-rw-r--r--units/systemd-udev-hwdb-update.service.in22
-rw-r--r--units/systemd-udevd.service.in2
8 files changed, 73 insertions, 4 deletions
diff --git a/units/.gitignore b/units/.gitignore
index 45ddab72e8..8ae6ca8946 100644
--- a/units/.gitignore
+++ b/units/.gitignore
@@ -32,6 +32,7 @@
/systemd-initctl.service
/systemd-journal-flush.service
/systemd-journal-gatewayd.service
+/systemd-journal-catalog-update.service
/systemd-journald.service
/systemd-kexec.service
/systemd-localed.service
@@ -54,12 +55,14 @@
/systemd-shutdownd.service
/systemd-suspend.service
/systemd-sysctl.service
+/systemd-sysusers.service
/systemd-timedated.service
/systemd-timesyncd.service
/systemd-tmpfiles-clean.service
/systemd-tmpfiles-setup-dev.service
/systemd-tmpfiles-setup.service
/systemd-tmpfiles.service
+/systemd-udev-hwdb-update.service
/systemd-udev-settle.service
/systemd-udev-trigger.service
/systemd-udevd.service
diff --git a/units/systemd-journal-catalog-update.service.in b/units/systemd-journal-catalog-update.service.in
new file mode 100644
index 0000000000..d45381d47b
--- /dev/null
+++ b/units/systemd-journal-catalog-update.service.in
@@ -0,0 +1,22 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Rebuild Journal Catalog
+Documentation=man:systemd-journald.service(8) man:journald.conf(5)
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target
+Before=sysinit.target shutdown.target systemd-update-done.service
+RefuseManualStart=yes
+RefuseManualStop=yes
+ConditionNeedsUpdate=/etc
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@rootbindir@/journalctl --update-catalog
diff --git a/units/systemd-networkd.service.in b/units/systemd-networkd.service.in
index 48f4d63a87..57c3fbff51 100644
--- a/units/systemd-networkd.service.in
+++ b/units/systemd-networkd.service.in
@@ -9,7 +9,7 @@
Description=Network Service
Documentation=man:systemd-networkd.service(8)
DefaultDependencies=no
-After=dbus.service network-pre.target
+After=dbus.service network-pre.target systemd-sysusers.service
Before=network.target
Wants=network.target
ConditionCapability=CAP_NET_ADMIN
diff --git a/units/systemd-sysusers.service.in b/units/systemd-sysusers.service.in
new file mode 100644
index 0000000000..e123f398a4
--- /dev/null
+++ b/units/systemd-sysusers.service.in
@@ -0,0 +1,22 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Create System Users
+Documentation=man:sysusers.d(5) man:systemd-sysusers.service(8)
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service
+Before=sysinit.target shutdown.target systemd-update-done.service
+RefuseManualStart=yes
+RefuseManualStop=yes
+ConditionNeedsUpdate=/etc
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@rootlibexecdir@/systemd-sysusers
diff --git a/units/systemd-timesyncd.service.in b/units/systemd-timesyncd.service.in
index 3a1bc48a91..a20621dd58 100644
--- a/units/systemd-timesyncd.service.in
+++ b/units/systemd-timesyncd.service.in
@@ -11,7 +11,7 @@ Documentation=man:systemd-timesyncd.service(8)
ConditionCapability=CAP_SYS_TIME
DefaultDependencies=off
RequiresMountsFor=/var/lib/systemd/clock
-After=systemd-remount-fs.service systemd-tmpfiles-setup.service
+After=systemd-remount-fs.service systemd-tmpfiles-setup.service systemd-sysusers.service
Before=sysinit.target shutdown.target
Conflicts=shutdown.target
Wants=time-sync.target
diff --git a/units/systemd-tmpfiles-setup.service.in b/units/systemd-tmpfiles-setup.service.in
index 747c9a8d65..d3c6da88c4 100644
--- a/units/systemd-tmpfiles-setup.service.in
+++ b/units/systemd-tmpfiles-setup.service.in
@@ -10,7 +10,7 @@ Description=Create Volatile Files and Directories
Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
DefaultDependencies=no
Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target
+After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target systemd-sysusers.service
Before=sysinit.target shutdown.target
RefuseManualStart=yes
RefuseManualStop=yes
diff --git a/units/systemd-udev-hwdb-update.service.in b/units/systemd-udev-hwdb-update.service.in
new file mode 100644
index 0000000000..4e7b845ea4
--- /dev/null
+++ b/units/systemd-udev-hwdb-update.service.in
@@ -0,0 +1,22 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Rebuild Hardware Database
+Documentation=man:udev(7) man:systemd-udevd.service(8)
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service
+Before=sysinit.target shutdown.target systemd-update-done.service
+RefuseManualStart=yes
+RefuseManualStop=yes
+ConditionNeedsUpdate=/etc
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@rootbindir@/udevadm hwdb --update
diff --git a/units/systemd-udevd.service.in b/units/systemd-udevd.service.in
index ddee01537a..f6acd6fe4c 100644
--- a/units/systemd-udevd.service.in
+++ b/units/systemd-udevd.service.in
@@ -10,7 +10,7 @@ Description=udev Kernel Device Manager
Documentation=man:systemd-udevd.service(8) man:udev(7)
DefaultDependencies=no
Wants=systemd-udevd-control.socket systemd-udevd-kernel.socket
-After=systemd-udevd-control.socket systemd-udevd-kernel.socket
+After=systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udev-hwdb-update.service systemd-sysusers.service
Before=sysinit.target
ConditionPathIsReadWrite=/sys