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

Note, that this creates a `Wanted` dependency in the target unit, which
implies an `After`-dependency as well (see systemd.target(5)).

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

    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 dependency on sysinit.target.
  • Loading branch information
donald committed Jun 19, 2023
1 parent f95e753 commit b6384f8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions misc_systemd_units/startup-tags.service
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
[Unit]

DefaultDependencies=no
After=systemd-remount-fs.service

[Service]

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

[Install]

WantedBy=sysinit.target

0 comments on commit b6384f8

Please sign in to comment.