]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: do more reordering of ordering config
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 15 Sep 2022 13:54:18 +0000 (15:54 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 23 May 2023 10:39:16 +0000 (12:39 +0200)
No functional change, just a cleanup to make the subsequent changes easier to
see. This is a continuation of 9810e419425263bde86787bc21251f1ad3c35628

> The block is reordered and split to have:
>    1. description + documentation
>    2. (optionally) conditions
>    3. all the dependencies

The dependencies for shutdown.target are listed separately because they are the
other deps are for startup, and shutdown.target only matter much later.

18 files changed:
units/local-fs.target
units/proc-sys-fs-binfmt_misc.automount
units/quotaon.service.in
units/systemd-boot-update.service
units/systemd-firstboot.service
units/systemd-growfs-root.service.in
units/systemd-growfs@.service.in
units/systemd-hwdb-update.service.in
units/systemd-journal-catalog-update.service
units/systemd-journal-flush.service
units/systemd-quotacheck.service.in
units/systemd-random-seed.service.in
units/systemd-remount-fs.service.in
units/systemd-repart.service.in
units/systemd-rfkill.socket
units/systemd-sysusers.service
units/systemd-update-utmp.service.in
units/systemd-vconsole-setup.service.in

index 02797953a5bea974c6c1d75cb4180cf905df58e2..fe175a7af9b002ff57c57aa09bdae5e5958ba567 100644 (file)
@@ -10,8 +10,9 @@
 [Unit]
 Description=Local File Systems
 Documentation=man:systemd.special(7)
+
 DefaultDependencies=no
-Conflicts=shutdown.target
 After=local-fs-pre.target
+Conflicts=shutdown.target
 OnFailure=emergency.target
 OnFailureJobMode=replace-irreversibly
index 6b1bbdc91e08bb4361a3c860d99e6cd8ff4d25b2..41396f929914a8458f55cba58b3b37e841f3c98f 100644 (file)
 Description=Arbitrary Executable File Formats File System Automount Point
 Documentation=https://docs.kernel.org/admin-guide/binfmt-misc.html
 Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+
+ConditionPathExists=/proc/sys/fs/binfmt_misc/
+ConditionPathIsReadWrite=/proc/sys/
+
 DefaultDependencies=no
 Before=sysinit.target
 Conflicts=shutdown.target
-ConditionPathExists=/proc/sys/fs/binfmt_misc/
-ConditionPathIsReadWrite=/proc/sys/
 
 [Automount]
 Where=/proc/sys/fs/binfmt_misc
index ffabebfafe69467cf4709fcddcc49c6856304c95..7fa7061eeaef01bdda4b2d4e1002da4f29bdd85b 100644 (file)
 [Unit]
 Description=Enable File System Quotas
 Documentation=man:quotaon(8)
+
+ConditionPathExists={{QUOTAON}}
+
 DefaultDependencies=no
 After=systemd-quotacheck.service
-Before=remote-fs.target shutdown.target
-ConditionPathExists={{QUOTAON}}
+Before=remote-fs.target
+Before=shutdown.target
 
 [Service]
 Type=oneshot
index fe63fde35ac0a598e3171469d5f0c84091952d4c..ce9187bbfedd8844ed78a829954018406b4944d3 100644 (file)
@@ -13,8 +13,9 @@ Documentation=man:bootctl(1)
 
 DefaultDependencies=no
 After=local-fs.target
+Before=sysinit.target systemd-update-done.service
 Conflicts=shutdown.target
-Before=sysinit.target shutdown.target systemd-update-done.service
+Before=shutdown.target
 
 [Service]
 Type=oneshot
index 2e57b064c183d9a2219fa97829109d458578bd17..58f3eeb679283d7fccfcea773b469beaf05dd151 100644 (file)
 [Unit]
 Description=First Boot Wizard
 Documentation=man:systemd-firstboot(1)
+
+ConditionPathIsReadWrite=/etc
+ConditionFirstBoot=yes
+
 DefaultDependencies=no
-Conflicts=shutdown.target
 After=systemd-remount-fs.service
-Before=systemd-sysusers.service systemd-vconsole-setup.service sysinit.target first-boot-complete.target shutdown.target
+Before=systemd-sysusers.service systemd-vconsole-setup.service sysinit.target first-boot-complete.target
 Wants=first-boot-complete.target
-ConditionPathIsReadWrite=/etc
-ConditionFirstBoot=yes
+Conflicts=shutdown.target
+Before=shutdown.target
 
 [Service]
 Type=oneshot
index 295bafd5affb7c3f44f39e9b288316718e73d7ed..61b825672d27245487df724ff66a3a604b39b784 100644 (file)
 [Unit]
 Description=Grow Root File System
 Documentation=man:systemd-growfs-root.service(8)
+
 DefaultDependencies=no
-Conflicts=shutdown.target
 After=systemd-repart.service systemd-remount-fs.service
+Conflicts=shutdown.target
 Before=shutdown.target
 
 [Service]
index 7154e4ca7658001075ea185665dbd96c3f92c816..d7c90e96fceb4a5cbef89fa35f1c03271e34a981 100644 (file)
 [Unit]
 Description=Grow File System on %f
 Documentation=man:systemd-growfs@.service(8)
+
 DefaultDependencies=no
 BindsTo=%i.mount
-Conflicts=shutdown.target
 After=systemd-repart.service %i.mount
+Conflicts=shutdown.target
 Before=shutdown.target
 
 [Service]
index a09fe8aa52d0475061c705909f945a790b58f6dc..4ba36d1fc6e05df12d7f84bc9cbeb4ae7b807357 100644 (file)
 [Unit]
 Description=Rebuild Hardware Database
 Documentation=man:hwdb(7) man:systemd-hwdb(8)
-DefaultDependencies=no
-Conflicts=shutdown.target
-After=systemd-remount-fs.service
-Before=sysinit.target shutdown.target systemd-update-done.service
+
 ConditionNeedsUpdate=/etc
 ConditionPathExists=|!{{UDEVLIBEXECDIR}}/hwdb.bin
 ConditionPathExists=|/etc/udev/hwdb.bin
 ConditionDirectoryNotEmpty=|/etc/udev/hwdb.d/
 
+DefaultDependencies=no
+After=systemd-remount-fs.service
+Before=sysinit.target systemd-update-done.service
+Conflicts=shutdown.target
+Before=shutdown.target
+
 [Service]
 Type=oneshot
 RemainAfterExit=yes
index 477925685a289cb270cef340a96bb91430477a98..691e03fe62f02be6ea6ec8421983dae65320f7f4 100644 (file)
 [Unit]
 Description=Rebuild Journal Catalog
 Documentation=man:systemd-journald.service(8) man:journald.conf(5)
+
+ConditionNeedsUpdate=/var
+
 DefaultDependencies=no
-Conflicts=shutdown.target
 After=local-fs.target systemd-tmpfiles-setup.service
-Before=sysinit.target shutdown.target systemd-update-done.service
-ConditionNeedsUpdate=/var
+Before=sysinit.target systemd-update-done.service
+Conflicts=shutdown.target
+Before=shutdown.target
 
 [Service]
 Type=oneshot
index 5d0b811ae394bc68b1d99a325739169b897324f9..8c01587cad81505c127616425f3e08c03db4a319 100644 (file)
 [Unit]
 Description=Flush Journal to Persistent Storage
 Documentation=man:systemd-journald.service(8) man:journald.conf(5)
+
+ConditionPathExists=!/etc/initrd-release
+
 DefaultDependencies=no
-Wants=systemd-journald.service
-After=systemd-journald.service systemd-remount-fs.service
+After=systemd-remount-fs.service
 Before=systemd-tmpfiles-setup.service
+Wants=systemd-journald.service
+After=systemd-journald.service
 RequiresMountsFor=/var/log/journal
-ConditionPathExists=!/etc/initrd-release
 
 [Service]
 ExecStart=journalctl --flush
index c3e936d2203f788fdf08fbe21b2731a7ed191de6..05c14ff8b6e77a5336e921606a998933e19c447a 100644 (file)
 [Unit]
 Description=File System Quota Check
 Documentation=man:systemd-quotacheck.service(8)
+
+ConditionPathExists={{QUOTACHECK}}
+
 DefaultDependencies=no
 After=systemd-remount-fs.service
-Before=remote-fs.target shutdown.target
-ConditionPathExists={{QUOTACHECK}}
+Before=remote-fs.target
+Before=shutdown.target
 
 [Service]
 Type=oneshot
index d57b2d12693a2e76daf139e156716d4a99b4c381..820fdd8536ddd4fe50faf7e96bcd1ec8670c92b2 100644 (file)
 Description=Load/Save OS Random Seed
 Documentation=man:systemd-random-seed.service(8) man:random(4)
 
+ConditionVirtualization=!container
+ConditionPathExists=!/etc/initrd-release
+
 DefaultDependencies=no
-RequiresMountsFor={{RANDOM_SEED}}
-Conflicts=shutdown.target
 After=systemd-remount-fs.service
-Before=first-boot-complete.target shutdown.target
+Before=first-boot-complete.target
+RequiresMountsFor={{RANDOM_SEED}}
 Wants=first-boot-complete.target
-
-ConditionVirtualization=!container
-ConditionPathExists=!/etc/initrd-release
+Conflicts=shutdown.target
+Before=shutdown.target
 
 [Service]
 Type=oneshot
index 2abed1d0a9c8c5726028a3a1a3f4208d423e174f..be1dfd6199a71a584d8eb69c03bb38604d895356 100644 (file)
 Description=Remount Root and Kernel File Systems
 Documentation=man:systemd-remount-fs.service(8)
 Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+
 DefaultDependencies=no
-Conflicts=shutdown.target
 After=systemd-fsck-root.service
-Before=local-fs-pre.target local-fs.target shutdown.target
+Before=local-fs-pre.target local-fs.target
 Wants=local-fs-pre.target
+Conflicts=shutdown.target
+Before=shutdown.target
 
 [Service]
 Type=oneshot
index 105be680cd66976044c4100bf6495492c019e967..5c04a218349cb44a218fe366f3564559000a5d40 100644 (file)
 [Unit]
 Description=Repartition Root Disk
 Documentation=man:systemd-repart.service(8)
-DefaultDependencies=no
-Conflicts=shutdown.target
-Wants=modprobe@loop.service modprobe@dm_mod.service
-After=initrd-usr-fs.target modprobe@loop.service modprobe@dm_mod.service
-Before=initrd-root-fs.target shutdown.target
+
 ConditionVirtualization=!container
 ConditionDirectoryNotEmpty=|/usr/lib/repart.d
 ConditionDirectoryNotEmpty=|/usr/local/lib/repart.d
@@ -26,6 +22,13 @@ ConditionDirectoryNotEmpty=|/sysroot/etc/repart.d
 ConditionDirectoryNotEmpty=|/sysusr/usr/lib/repart.d
 ConditionDirectoryNotEmpty=|/sysusr/usr/local/lib/repart.d
 
+DefaultDependencies=no
+Wants=modprobe@loop.service modprobe@dm_mod.service
+After=initrd-usr-fs.target modprobe@loop.service modprobe@dm_mod.service
+Before=initrd-root-fs.target
+Conflicts=shutdown.target
+Before=shutdown.target
+
 [Service]
 Type=oneshot
 RemainAfterExit=yes
index 4ca8d6fc04d963de5e9e4392284582eced08e629..81c0e8c9c6caaa60152a8d475ef676bfc9db50e0 100644 (file)
 [Unit]
 Description=Load/Save RF Kill Switch Status /dev/rfkill Watch
 Documentation=man:systemd-rfkill.socket(8)
+
 DefaultDependencies=no
 BindsTo=sys-devices-virtual-misc-rfkill.device
 After=sys-devices-virtual-misc-rfkill.device systemd-remount-fs.service
-RequiresMountsFor=/var/lib/systemd/rfkill
 Conflicts=shutdown.target
 Before=shutdown.target
+RequiresMountsFor=/var/lib/systemd/rfkill
 
 [Socket]
 ListenSpecial=/dev/rfkill
index 0eb40294b2123b668e9ee68e956f13b19671ed7b..2ec276684164cf8184d211448acb4a2ec43c8ab3 100644 (file)
 Description=Create System Users
 Documentation=man:sysusers.d(5) man:systemd-sysusers.service(8)
 
+ConditionNeedsUpdate=|/etc
+ConditionCredential=|sysusers.extra
+
 DefaultDependencies=no
 After=systemd-remount-fs.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
-
 [Service]
 Type=oneshot
 RemainAfterExit=yes
index cedefa8e08de195dd3b3d65f5b95ab952af26b36..f1278fae32e4aed7fbd2c0e8dc5c95f048345662 100644 (file)
 [Unit]
 Description=Record System Boot/Shutdown in UTMP
 Documentation=man:systemd-update-utmp.service(8) man:utmp(5)
+
 DefaultDependencies=no
-RequiresMountsFor=/var/log/wtmp
-Conflicts=shutdown.target
 After=systemd-remount-fs.service systemd-tmpfiles-setup.service auditd.service
-Before=sysinit.target shutdown.target
+Before=sysinit.target
+Conflicts=shutdown.target
+Before=shutdown.target
+RequiresMountsFor=/var/log/wtmp
 
 [Service]
 Type=oneshot
index 00095283075542aa8982dc1a411dbe30224ab64b..41d738a63d47294cfaeb9507bd5cc310980550c1 100644 (file)
 [Unit]
 Description=Setup Virtual Console
 Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5)
+
+ConditionPathExists=/dev/tty0
+
 DefaultDependencies=no
 Before=sysinit.target
 Before=initrd-switch-root.target shutdown.target
-ConditionPathExists=/dev/tty0
 
 [Service]
 Type=oneshot