Skip to content

Commit

Permalink
startup-tags: Pull startup-tags from sysinit.target
Browse files Browse the repository at this point in the history
- Make startup-tags a dependency of sysinit-target

    WantedBy=sysinit.target
    Before=sysinit.target

Note, that while a Wants= idependency in a .target unit would imimply a
After= order dependency, this does not apply to dependencies created via
from WantedBy, so we have to specify the order explicitly.

- Disable default dependencies for this service unit, because service
  units have a default dependency on sysinit.target and we can't wait
  for ourself.

    DefaultDependencies=no

- Wait for the root device remounted read/write, so that we can populate
  /node

    After=systemd-remount-fs.service

With this change, we no longer need to create an explicit dependency to
this unit in conditionally started service or socket units, because these units
have a default order dependency on sysinit.target and the later
basic.target.
  • Loading branch information
donald committed Jun 20, 2023
1 parent f95e753 commit 0916bc6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions misc_systemd_units/startup-tags.service
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
[Unit]

DefaultDependencies=no
After=systemd-remount-fs.service
Before=sysinit.target

[Service]

Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/hostconfig --populate-node

[Install]

WantedBy=sysinit.target

0 comments on commit 0916bc6

Please sign in to comment.