From b6384f87b1966200a7d98e0dc0000f04f4b26b28 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Mon, 19 Jun 2023 15:07:24 +0200 Subject: [PATCH] startup-tags: Pull startup-tags from sysinit.target - 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. --- misc_systemd_units/startup-tags.service | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/misc_systemd_units/startup-tags.service b/misc_systemd_units/startup-tags.service index fc2b4de..ae2d42f 100644 --- a/misc_systemd_units/startup-tags.service +++ b/misc_systemd_units/startup-tags.service @@ -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