]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: reorder/split unit dependency blocks
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 14 Sep 2022 11:39:10 +0000 (12:39 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 15 Sep 2022 12:59:11 +0000 (14:59 +0200)
The block is reordered and split to have:
  1. description + documentation
  2. (optionally) conditions
  3. all the dependencies
I think it's easier to read the units this way.
Also, the Conflicts+Before is seperated out to separate lines.
The ordering dependency is "fake", because it could just as well be
After=, we are adding it to force ordering wrt. shutdown.target, and
it plays a different role than the other Before=, which are about a
real ordering on boot.

13 files changed:
units/initrd-switch-root.service
units/ldconfig.service
units/sysinit.target
units/systemd-ask-password-console.path
units/systemd-ask-password-console.service
units/systemd-ask-password-wall.path
units/systemd-boot-system-token.service
units/systemd-network-generator.service.in
units/systemd-sysext.service
units/systemd-sysusers.service
units/systemd-tmpfiles-clean.service
units/systemd-tmpfiles-setup-dev.service
units/systemd-tmpfiles-setup.service

index e3d692671126068fdbead9bb18cbea997706c57e..9914d2640816e5f86aa2c5271e671202a9353a5f 100644 (file)
@@ -9,11 +9,13 @@
 
 [Unit]
 Description=Switch Root
-DefaultDependencies=no
+
 AssertPathExists=/etc/initrd-release
+
+DefaultDependencies=no
+AllowIsolate=yes
 OnFailure=emergency.target
 OnFailureJobMode=replace-irreversibly
-AllowIsolate=yes
 
 [Service]
 Type=oneshot
index 33824d4d4f28e2348a25210fd85a3dffa6548ce8..cb887ae8659de51195bc775811b76b92dc1af6ee 100644 (file)
 [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
+Before=shutdown.target
+
 [Service]
 Type=oneshot
 RemainAfterExit=yes
index eed3d16b458519b1ef6ecc99d24d4795538dc1b9..5187605a3c43c578a71ab62cb435cdc73d2f4ef6 100644 (file)
@@ -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
index 7b849230237bb376ec77721f088fd36fb218621f..997fe0ff0c7db1eb0534cf0d48b23162aa73ad08 100644 (file)
 [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
+Conflicts=shutdown.target
+Before=shutdown.target
 
 [Path]
 DirectoryNotEmpty=/run/systemd/ask-password
index d31f3fa70f02d7c73b9994332b85981ef4e4699a..97c651f0090082c25f416c62f6f1c0c76fa5921f 100644 (file)
 [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
+Conflicts=emergency.service
+Conflicts=shutdown.target
 Before=shutdown.target
-ConditionPathExists=!/run/plymouth/pid
 
 [Service]
 ExecStart=systemd-tty-ask-password-agent --watch --console
index 13e1dae672c25956dd93e09e7a2850f52b448687..e3b6c61346ef4d8a33b0245b04bf5bed3f0e569e 100644 (file)
 [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
+Conflicts=shutdown.target
+Before=shutdown.target
 
 [Path]
 DirectoryNotEmpty=/run/systemd/ask-password
index 55f05ec8d899706f81e73762a9344d54d54827ad..56d3c8ad471a314d547a4c55b45be3e65adb6054 100644 (file)
@@ -10,6 +10,7 @@
 [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
index 6c65efa20e838c81313c88654ae1d579c4e820c4..ff95266d39d6ed593be08c0e438c16283709eac1 100644 (file)
@@ -10,6 +10,7 @@
 [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
index 35b5edca1dc82af0f2462c2aceb8e1d070d149ce..245c0e5a0d41648513e0e9832c821907a98cf404 100644 (file)
 [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
+Before=shutdown.target
+
 [Service]
 Type=oneshot
 RemainAfterExit=yes
index 91132dafa98d8d24f64f55f7215dbc086027fe85..8b9335ff28ac7037dd6ce27125e368d31406e1c1 100644 (file)
 [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
+Before=shutdown.target
+
 ConditionNeedsUpdate=|/etc
 ConditionCredential=|sysusers.extra
 
index 6ae4e74ddd07db22867678dc336cb3290ccaa0d0..7f1b7ec594e8d8528abe7bde101a42eb2101818a 100644 (file)
@@ -10,6 +10,7 @@
 [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
index ad0e54fcc418e7370db0456d0ebf9f50e150a2ee..d202a7568f356ae96c762be468bbd478ec3b5786 100644 (file)
 [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
+Before=shutdown.target
 
 [Service]
 Type=oneshot
index fc6a4a0e0be2b03f02791600f439d7a5314a4270..baed27df7589146ca6a443b6edb6638b481cfdcd 100644 (file)
 [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
+Before=shutdown.target
 RefuseManualStop=yes
 
 [Service]