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.
This commit is contained in:
parent
a55654d598
commit
ecde7065f7
25
Makefile.am
25
Makefile.am
|
@ -491,6 +491,7 @@ nodist_systemunit_DATA = \
|
||||||
units/systemd-udevd.service \
|
units/systemd-udevd.service \
|
||||||
units/systemd-udev-trigger.service \
|
units/systemd-udev-trigger.service \
|
||||||
units/systemd-udev-settle.service \
|
units/systemd-udev-settle.service \
|
||||||
|
units/systemd-udev-hwdb-update.service \
|
||||||
units/debug-shell.service \
|
units/debug-shell.service \
|
||||||
units/initrd-parse-etc.service \
|
units/initrd-parse-etc.service \
|
||||||
units/initrd-cleanup.service \
|
units/initrd-cleanup.service \
|
||||||
|
@ -1783,10 +1784,17 @@ systemd_sysusers_LDADD = \
|
||||||
rootlibexec_PROGRAMS += \
|
rootlibexec_PROGRAMS += \
|
||||||
systemd-sysusers
|
systemd-sysusers
|
||||||
|
|
||||||
|
nodist_systemunit_DATA += \
|
||||||
|
units/systemd-sysusers.service
|
||||||
|
|
||||||
|
SYSINIT_TARGET_WANTS += \
|
||||||
|
systemd-sysusers.service
|
||||||
|
|
||||||
nodist_sysusers_DATA = \
|
nodist_sysusers_DATA = \
|
||||||
sysusers.d/systemd.conf
|
sysusers.d/systemd.conf
|
||||||
|
|
||||||
EXTRA_DIST += \
|
EXTRA_DIST += \
|
||||||
|
units/systemd-sysusers.service.in \
|
||||||
sysusers.d/systemd.conf.in
|
sysusers.d/systemd.conf.in
|
||||||
|
|
||||||
INSTALL_DIRS += \
|
INSTALL_DIRS += \
|
||||||
|
@ -2753,19 +2761,23 @@ CLEANFILES += \
|
||||||
EXTRA_DIST += \
|
EXTRA_DIST += \
|
||||||
units/systemd-udevd.service.in \
|
units/systemd-udevd.service.in \
|
||||||
units/systemd-udev-trigger.service.in \
|
units/systemd-udev-trigger.service.in \
|
||||||
units/systemd-udev-settle.service.in
|
units/systemd-udev-settle.service.in \
|
||||||
|
units/systemd-udev-hwdb-update.service.in
|
||||||
|
|
||||||
CLEANFILES += \
|
CLEANFILES += \
|
||||||
units/systemd-udevd.service \
|
units/systemd-udevd.service \
|
||||||
units/systemd-udev-trigger.service \
|
units/systemd-udev-trigger.service \
|
||||||
units/systemd-udev-settle.service
|
units/systemd-udev-settle.service \
|
||||||
|
units/systemd-udev-hwdb-update.service
|
||||||
|
|
||||||
SOCKETS_TARGET_WANTS += \
|
SOCKETS_TARGET_WANTS += \
|
||||||
systemd-udevd-control.socket \
|
systemd-udevd-control.socket \
|
||||||
systemd-udevd-kernel.socket
|
systemd-udevd-kernel.socket
|
||||||
|
|
||||||
SYSINIT_TARGET_WANTS += \
|
SYSINIT_TARGET_WANTS += \
|
||||||
systemd-udevd.service \
|
systemd-udevd.service \
|
||||||
systemd-udev-trigger.service
|
systemd-udev-trigger.service \
|
||||||
|
systemd-udev-hwdb-update.service
|
||||||
|
|
||||||
rootbin_PROGRAMS += \
|
rootbin_PROGRAMS += \
|
||||||
udevadm
|
udevadm
|
||||||
|
@ -3540,7 +3552,8 @@ dist_systemunit_DATA += \
|
||||||
|
|
||||||
nodist_systemunit_DATA += \
|
nodist_systemunit_DATA += \
|
||||||
units/systemd-journald.service \
|
units/systemd-journald.service \
|
||||||
units/systemd-journal-flush.service
|
units/systemd-journal-flush.service \
|
||||||
|
units/systemd-journal-catalog-update.service
|
||||||
|
|
||||||
dist_pkgsysconf_DATA += \
|
dist_pkgsysconf_DATA += \
|
||||||
src/journal/journald.conf
|
src/journal/journald.conf
|
||||||
|
@ -3557,11 +3570,13 @@ SOCKETS_TARGET_WANTS += \
|
||||||
|
|
||||||
SYSINIT_TARGET_WANTS += \
|
SYSINIT_TARGET_WANTS += \
|
||||||
systemd-journald.service \
|
systemd-journald.service \
|
||||||
systemd-journal-flush.service
|
systemd-journal-flush.service \
|
||||||
|
systemd-journal-catalog-update.service
|
||||||
|
|
||||||
EXTRA_DIST += \
|
EXTRA_DIST += \
|
||||||
units/systemd-journald.service.in \
|
units/systemd-journald.service.in \
|
||||||
units/systemd-journal-flush.service.in \
|
units/systemd-journal-flush.service.in \
|
||||||
|
units/systemd-journal-catalog-update.service.in \
|
||||||
src/journal/journald-gperf.gperf
|
src/journal/journald-gperf.gperf
|
||||||
|
|
||||||
CLEANFILES += \
|
CLEANFILES += \
|
||||||
|
|
3
units/.gitignore
vendored
3
units/.gitignore
vendored
|
@ -32,6 +32,7 @@
|
||||||
/systemd-initctl.service
|
/systemd-initctl.service
|
||||||
/systemd-journal-flush.service
|
/systemd-journal-flush.service
|
||||||
/systemd-journal-gatewayd.service
|
/systemd-journal-gatewayd.service
|
||||||
|
/systemd-journal-catalog-update.service
|
||||||
/systemd-journald.service
|
/systemd-journald.service
|
||||||
/systemd-kexec.service
|
/systemd-kexec.service
|
||||||
/systemd-localed.service
|
/systemd-localed.service
|
||||||
|
@ -54,12 +55,14 @@
|
||||||
/systemd-shutdownd.service
|
/systemd-shutdownd.service
|
||||||
/systemd-suspend.service
|
/systemd-suspend.service
|
||||||
/systemd-sysctl.service
|
/systemd-sysctl.service
|
||||||
|
/systemd-sysusers.service
|
||||||
/systemd-timedated.service
|
/systemd-timedated.service
|
||||||
/systemd-timesyncd.service
|
/systemd-timesyncd.service
|
||||||
/systemd-tmpfiles-clean.service
|
/systemd-tmpfiles-clean.service
|
||||||
/systemd-tmpfiles-setup-dev.service
|
/systemd-tmpfiles-setup-dev.service
|
||||||
/systemd-tmpfiles-setup.service
|
/systemd-tmpfiles-setup.service
|
||||||
/systemd-tmpfiles.service
|
/systemd-tmpfiles.service
|
||||||
|
/systemd-udev-hwdb-update.service
|
||||||
/systemd-udev-settle.service
|
/systemd-udev-settle.service
|
||||||
/systemd-udev-trigger.service
|
/systemd-udev-trigger.service
|
||||||
/systemd-udevd.service
|
/systemd-udevd.service
|
||||||
|
|
22
units/systemd-journal-catalog-update.service.in
Normal file
22
units/systemd-journal-catalog-update.service.in
Normal file
|
@ -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
|
|
@ -9,7 +9,7 @@
|
||||||
Description=Network Service
|
Description=Network Service
|
||||||
Documentation=man:systemd-networkd.service(8)
|
Documentation=man:systemd-networkd.service(8)
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
After=dbus.service network-pre.target
|
After=dbus.service network-pre.target systemd-sysusers.service
|
||||||
Before=network.target
|
Before=network.target
|
||||||
Wants=network.target
|
Wants=network.target
|
||||||
ConditionCapability=CAP_NET_ADMIN
|
ConditionCapability=CAP_NET_ADMIN
|
||||||
|
|
22
units/systemd-sysusers.service.in
Normal file
22
units/systemd-sysusers.service.in
Normal file
|
@ -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
|
|
@ -11,7 +11,7 @@ Documentation=man:systemd-timesyncd.service(8)
|
||||||
ConditionCapability=CAP_SYS_TIME
|
ConditionCapability=CAP_SYS_TIME
|
||||||
DefaultDependencies=off
|
DefaultDependencies=off
|
||||||
RequiresMountsFor=/var/lib/systemd/clock
|
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
|
Before=sysinit.target shutdown.target
|
||||||
Conflicts=shutdown.target
|
Conflicts=shutdown.target
|
||||||
Wants=time-sync.target
|
Wants=time-sync.target
|
||||||
|
|
|
@ -10,7 +10,7 @@ Description=Create Volatile Files and Directories
|
||||||
Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
|
Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
Conflicts=shutdown.target
|
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
|
Before=sysinit.target shutdown.target
|
||||||
RefuseManualStart=yes
|
RefuseManualStart=yes
|
||||||
RefuseManualStop=yes
|
RefuseManualStop=yes
|
||||||
|
|
22
units/systemd-udev-hwdb-update.service.in
Normal file
22
units/systemd-udev-hwdb-update.service.in
Normal file
|
@ -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
|
|
@ -10,7 +10,7 @@ Description=udev Kernel Device Manager
|
||||||
Documentation=man:systemd-udevd.service(8) man:udev(7)
|
Documentation=man:systemd-udevd.service(8) man:udev(7)
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
Wants=systemd-udevd-control.socket systemd-udevd-kernel.socket
|
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
|
Before=sysinit.target
|
||||||
ConditionPathIsReadWrite=/sys
|
ConditionPathIsReadWrite=/sys
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue