[systemd-devel] [EXT] Re: Service not starting that wants first-boot-complete.target

Mantas Mikulėnas grawity at gmail.com
Wed Apr 9 10:05:38 UTC 2025


On Wed, Apr 9, 2025, 12:52 Windl, Ulrich <u.windl at ukr.de> wrote:

> Hi!
>
> Wasn't there an agreement that "wanting a target" is always wrong? Isn't
> "After" you are after? 😉
>

I've never heard of that kind of agreement. Want on its own isn't enough
but *something* has to Want the target for the After to have any effect –
otherwise the After would remain a a no-op if nothing pulls the unit into
the transaction.

Whether the Wants should be in the "provider" or in the "consumer" is kind
of a case-by-case decision. Something like network-online.target contains
(Wants) actual services so it has to be Wanted from the consumer (as
there's no point in having it started when there are no consumers trying to
order After it). An order-only target could be Wanted from the provider
instead.


> Kind regards,
> Ulrich Windl
>
> > -----Original Message-----
> > From: systemd-devel <systemd-devel-bounces at lists.freedesktop.org> On
> > Behalf Of Andrei Borzenkov
> > Sent: Tuesday, April 8, 2025 2:22 PM
> > To: Christopher Hunt <huntchr at gmail.com>
> > Cc: systemd-devel at lists.freedesktop.org
> > Subject: [EXT] Re: [systemd-devel] Service not starting that wants
> first-boot-
> > complete.target
> >
> > 08.04.2025 07:50, Christopher Hunt wrote:
> > >
> > >
> > >> On 8 Apr 2025, at 2:40 PM, Andrei Borzenkov <arvidjaar at gmail.com>
> > wrote:
> > >>
> > >> It cannot be the complete file because earlier it says "enabled" and
> this
> > service does not have [Install] section.
> > >>
> > >> Anyway - something has to start this service. So far, you did not
> explain
> > how it is started.
> > >
> > > It is the complete file. I mentioned that I had linked it. To
> elaborate:
> > >
> > > # ls -al /etc/systemd/system/first-boot-complete.target.wants/
> > > total 8
> > > drwxr-xr-x    2 root     root          4096 Apr  7 11:35 .
> > > drwxr-xr-x   11 root     root          4096 Apr  7 22:18 ..
> > > lrwxrwxrwx    1 root     root            36 Apr  7 11:35
> resizefs.service ->
> > /etc/systemd/system/resizefs.service
> > >
> > > This is how the service is enabled. Thanks.
> >
> > So, your service Wants first-boot-complete.target and
> > first-boot-complete.target Wants your service. I still fail to see what
> > is causing either to be actually started.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20250409/733c17b0/attachment-0001.htm>


More information about the systemd-devel mailing list