summaryrefslogtreecommitdiff
path: root/units
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-09-17 13:26:51 +0200
committerGitHub <noreply@github.com>2022-09-17 13:26:51 +0200
commit15b3f7e30939e98b9b00a5c38e3bfc950ebb18de (patch)
treeec1c9fc0987aa35fcae580d587398217407f890f /units
parent9bf36477bf7c4c91405e6c298a98ef8b467ce1b2 (diff)
parent89c4dc52b3e635904e5cc6e7af500a8ea1963b64 (diff)
downloadsystemd-15b3f7e30939e98b9b00a5c38e3bfc950ebb18de.tar.gz
Merge pull request #24670 from keszybz/early-boot-ordering
Early boot ordering
Diffstat (limited to 'units')
-rw-r--r--units/initrd-switch-root.service7
-rw-r--r--units/ldconfig.service11
-rw-r--r--units/sysinit.target6
-rw-r--r--units/system-update-cleanup.service2
-rw-r--r--units/systemd-ask-password-console.path11
-rw-r--r--units/systemd-ask-password-console.service10
-rw-r--r--units/systemd-ask-password-wall.path8
-rw-r--r--units/systemd-boot-system-token.service5
-rw-r--r--units/systemd-network-generator.service.in3
-rw-r--r--units/systemd-sysext.service11
-rw-r--r--units/systemd-sysusers.service7
-rw-r--r--units/systemd-tmpfiles-clean.service5
-rw-r--r--units/systemd-tmpfiles-setup-dev.service6
-rw-r--r--units/systemd-tmpfiles-setup.service6
14 files changed, 67 insertions, 31 deletions
diff --git a/units/initrd-switch-root.service b/units/initrd-switch-root.service
index e3d6926711..b19b7bbc21 100644
--- a/units/initrd-switch-root.service
+++ b/units/initrd-switch-root.service
@@ -9,11 +9,14 @@
[Unit]
Description=Switch Root
-DefaultDependencies=no
+
AssertPathExists=/etc/initrd-release
+
+DefaultDependencies=no
+Wants=initrd-switch-root.target
+AllowIsolate=yes
OnFailure=emergency.target
OnFailureJobMode=replace-irreversibly
-AllowIsolate=yes
[Service]
Type=oneshot
diff --git a/units/ldconfig.service b/units/ldconfig.service
index 33824d4d4f..53c6d4ecb1 100644
--- a/units/ldconfig.service
+++ b/units/ldconfig.service
@@ -10,13 +10,16 @@
[Unit]
Description=Rebuild Dynamic Linker Cache
Documentation=man:ldconfig(8)
-DefaultDependencies=no
-Conflicts=shutdown.target
-After=local-fs.target
-Before=sysinit.target shutdown.target systemd-update-done.service
+
ConditionNeedsUpdate=|/etc
ConditionFileNotEmpty=|!/etc/ld.so.cache
+DefaultDependencies=no
+After=local-fs.target
+Before=sysinit.target systemd-update-done.service
+Conflicts=shutdown.target initrd-switch-root.target
+Before=shutdown.target initrd-switch-root.target
+
[Service]
Type=oneshot
RemainAfterExit=yes
diff --git a/units/sysinit.target b/units/sysinit.target
index eed3d16b45..5187605a3c 100644
--- a/units/sysinit.target
+++ b/units/sysinit.target
@@ -10,6 +10,8 @@
[Unit]
Description=System Initialization
Documentation=man:systemd.special(7)
-Conflicts=emergency.service emergency.target
+
Wants=local-fs.target swap.target
-After=local-fs.target swap.target emergency.service emergency.target
+After=local-fs.target swap.target
+Conflicts=emergency.service emergency.target
+Before=emergency.service emergency.target
diff --git a/units/system-update-cleanup.service b/units/system-update-cleanup.service
index d0878dcb0b..5a5dd725a1 100644
--- a/units/system-update-cleanup.service
+++ b/units/system-update-cleanup.service
@@ -32,4 +32,4 @@ ConditionPathIsSymbolicLink=|/system-update
[Service]
Type=oneshot
-ExecStart=/bin/rm -fv /system-update
+ExecStart=rm -fv /system-update
diff --git a/units/systemd-ask-password-console.path b/units/systemd-ask-password-console.path
index 7b84923023..5277db9a8d 100644
--- a/units/systemd-ask-password-console.path
+++ b/units/systemd-ask-password-console.path
@@ -10,11 +10,16 @@
[Unit]
Description=Dispatch Password Requests to Console Directory Watch
Documentation=man:systemd-ask-password-console.path(8)
+
+ConditionPathExists=!/run/plymouth/pid
+
DefaultDependencies=no
-Conflicts=shutdown.target emergency.service
After=plymouth-start.service
-Before=paths.target shutdown.target cryptsetup.target
-ConditionPathExists=!/run/plymouth/pid
+Before=paths.target cryptsetup.target
+Conflicts=emergency.service
+Before=emergency.service
+Conflicts=shutdown.target
+Before=shutdown.target
[Path]
DirectoryNotEmpty=/run/systemd/ask-password
diff --git a/units/systemd-ask-password-console.service b/units/systemd-ask-password-console.service
index d31f3fa70f..afd0f0baad 100644
--- a/units/systemd-ask-password-console.service
+++ b/units/systemd-ask-password-console.service
@@ -10,11 +10,15 @@
[Unit]
Description=Dispatch Password Requests to Console
Documentation=man:systemd-ask-password-console.service(8)
+
+ConditionPathExists=!/run/plymouth/pid
+
DefaultDependencies=no
-Conflicts=shutdown.target emergency.service
After=plymouth-start.service systemd-vconsole-setup.service
-Before=shutdown.target
-ConditionPathExists=!/run/plymouth/pid
+Conflicts=emergency.service
+Before=emergency.service
+Conflicts=shutdown.target initrd-switch-root.target
+Before=shutdown.target initrd-switch-root.target
[Service]
ExecStart=systemd-tty-ask-password-agent --watch --console
diff --git a/units/systemd-ask-password-wall.path b/units/systemd-ask-password-wall.path
index 13e1dae672..161562a8bd 100644
--- a/units/systemd-ask-password-wall.path
+++ b/units/systemd-ask-password-wall.path
@@ -10,9 +10,13 @@
[Unit]
Description=Forward Password Requests to Wall Directory Watch
Documentation=man:systemd-ask-password-wall.path(8)
+
DefaultDependencies=no
-Conflicts=shutdown.target emergency.service
-Before=paths.target shutdown.target cryptsetup.target
+Before=paths.target cryptsetup.target
+Conflicts=emergency.service
+Before=emergency.service
+Conflicts=shutdown.target
+Before=shutdown.target
[Path]
DirectoryNotEmpty=/run/systemd/ask-password
diff --git a/units/systemd-boot-system-token.service b/units/systemd-boot-system-token.service
index 55f05ec8d8..662a1fda04 100644
--- a/units/systemd-boot-system-token.service
+++ b/units/systemd-boot-system-token.service
@@ -10,10 +10,11 @@
[Unit]
Description=Store a System Token in an EFI Variable
Documentation=man:systemd-boot-system-token.service(8)
+
DefaultDependencies=no
-Conflicts=shutdown.target
After=local-fs.target systemd-random-seed.service
-Before=shutdown.target
+Conflicts=shutdown.target initrd-switch-root.target
+Before=shutdown.target initrd-switch-root.target
# Don't run this in a VM environment, because there EFI variables are not
# actually stored in NVRAM, independent of regular storage.
diff --git a/units/systemd-network-generator.service.in b/units/systemd-network-generator.service.in
index 6c65efa20e..2b79ca6b8a 100644
--- a/units/systemd-network-generator.service.in
+++ b/units/systemd-network-generator.service.in
@@ -10,9 +10,12 @@
[Unit]
Description=Generate network units from Kernel command line
Documentation=man:systemd-network-generator.service(8)
+
DefaultDependencies=no
Before=network-pre.target systemd-udevd.service
Wants=network-pre.target
+Conflicts=shutdown.target initrd-switch-root.target
+Before=shutdown.target initrd-switch-root.target
[Service]
Type=oneshot
diff --git a/units/systemd-sysext.service b/units/systemd-sysext.service
index 35b5edca1d..254de2b623 100644
--- a/units/systemd-sysext.service
+++ b/units/systemd-sysext.service
@@ -10,10 +10,7 @@
[Unit]
Description=Merge System Extension Images into /usr/ and /opt/
Documentation=man:systemd-sysext.service(8)
-DefaultDependencies=no
-Conflicts=shutdown.target
-After=local-fs.target
-Before=sysinit.target shutdown.target systemd-tmpfiles.service
+
ConditionCapability=CAP_SYS_ADMIN
ConditionDirectoryNotEmpty=|/etc/extensions
ConditionDirectoryNotEmpty=|/run/extensions
@@ -21,6 +18,12 @@ ConditionDirectoryNotEmpty=|/var/lib/extensions
ConditionDirectoryNotEmpty=|/usr/local/lib/extensions
ConditionDirectoryNotEmpty=|/usr/lib/extensions
+DefaultDependencies=no
+After=local-fs.target
+Before=sysinit.target systemd-tmpfiles.service
+Conflicts=shutdown.target initrd-switch-root.target
+Before=shutdown.target initrd-switch-root.target
+
[Service]
Type=oneshot
RemainAfterExit=yes
diff --git a/units/systemd-sysusers.service b/units/systemd-sysusers.service
index 91132dafa9..0eb40294b2 100644
--- a/units/systemd-sysusers.service
+++ b/units/systemd-sysusers.service
@@ -10,10 +10,13 @@
[Unit]
Description=Create System Users
Documentation=man:sysusers.d(5) man:systemd-sysusers.service(8)
+
DefaultDependencies=no
-Conflicts=shutdown.target
After=systemd-remount-fs.service
-Before=sysinit.target shutdown.target systemd-update-done.service
+Before=sysinit.target systemd-update-done.service
+Conflicts=shutdown.target initrd-switch-root.target
+Before=shutdown.target initrd-switch-root.target
+
ConditionNeedsUpdate=|/etc
ConditionCredential=|sysusers.extra
diff --git a/units/systemd-tmpfiles-clean.service b/units/systemd-tmpfiles-clean.service
index 6ae4e74ddd..4163aef729 100644
--- a/units/systemd-tmpfiles-clean.service
+++ b/units/systemd-tmpfiles-clean.service
@@ -10,10 +10,11 @@
[Unit]
Description=Cleanup of Temporary Directories
Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
+
DefaultDependencies=no
-Conflicts=shutdown.target initrd-switch-root.service
After=local-fs.target time-set.target
-Before=shutdown.target
+Conflicts=shutdown.target initrd-switch-root.target
+Before=shutdown.target initrd-switch-root.target
[Service]
Type=oneshot
diff --git a/units/systemd-tmpfiles-setup-dev.service b/units/systemd-tmpfiles-setup-dev.service
index ad0e54fcc4..c65539aa79 100644
--- a/units/systemd-tmpfiles-setup-dev.service
+++ b/units/systemd-tmpfiles-setup-dev.service
@@ -10,10 +10,12 @@
[Unit]
Description=Create Static Device Nodes in /dev
Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
+
DefaultDependencies=no
-Conflicts=shutdown.target
After=systemd-sysusers.service
-Before=sysinit.target local-fs-pre.target systemd-udevd.service shutdown.target
+Before=sysinit.target local-fs-pre.target systemd-udevd.service
+Conflicts=shutdown.target initrd-switch-root.target
+Before=shutdown.target initrd-switch-root.target
[Service]
Type=oneshot
diff --git a/units/systemd-tmpfiles-setup.service b/units/systemd-tmpfiles-setup.service
index fc6a4a0e0b..7e11eb9414 100644
--- a/units/systemd-tmpfiles-setup.service
+++ b/units/systemd-tmpfiles-setup.service
@@ -10,10 +10,12 @@
[Unit]
Description=Create Volatile Files and Directories
Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
+
DefaultDependencies=no
-Conflicts=shutdown.target initrd-switch-root.service
After=local-fs.target systemd-sysusers.service systemd-journald.service
-Before=sysinit.target shutdown.target
+Before=sysinit.target
+Conflicts=shutdown.target initrd-switch-root.target
+Before=shutdown.target initrd-switch-root.target
RefuseManualStop=yes
[Service]