Re: [systemd-devel] Generators, Targets and Stater Units - I am holding it wrong?

2025-06-23 Thread Marc Haber
Hi Lennart, thank you for trying to help. tl;dr setting the symlinks accomplishes the intended behavior. On Mon, Jun 23, 2025 at 01:27:24PM +0200, Lennart Poettering wrote: On So, 22.06.25 22:30, Marc Haber (mh+systemd-de...@zugschlus.de) wrote: I am not sure I follow. What are you trying to

Re: [systemd-devel] Doc issue: does BindsTo wait for a service to become active?

2025-06-23 Thread Andrei Borzenkov
23.06.2025 08:00, Christopher Hunt wrote: Howdy, I’m looking for some clarification on BindsTo as I’m wondering if there’s some clarification required in the doc (1). I think I’m perhaps misinterpreting what the doc is referring to as “active" i.e: "When used in conjunction with After= on the

Re: [systemd-devel] Generators, Targets and Stater Units - I am holding it wrong?

2025-06-23 Thread Marc Haber
On Mon, Jun 23, 2025 at 09:34:34AM +0300, Andrei Borzenkov wrote: 23.06.2025 09:28, Marc Haber wrote: On Mon, Jun 23, 2025 at 09:16:58AM +0300, Andrei Borzenkov wrote: /run/systemd/generator/console-log-starter.service.wants/console-log-9.service -> /run/systemd/generator/console-log-9.service

Re: [systemd-devel] Generators, Targets and Stater Units - I am holding it wrong?

2025-06-23 Thread Andrei Borzenkov
22.06.2025 23:30, Marc Haber wrote: Hi, the following works, but I doubt that it is a nice way to do it. I have a generator that generates a number of service, and I want all of those services automatically started at boot. I have: $ sudo systemctl cat console-log-8.service [sudo] password for

Re: [systemd-devel] Doc issue: does BindsTo wait for a service to become active?

2025-06-23 Thread Andrei Borzenkov
23.06.2025 09:14, Christopher Hunt wrote: On 23 Jun 2025, at 4:12 PM, Andrei Borzenkov wrote: How A.service and B.service are started exactly? systemctl enable A systemctl enable B That is meaningless without unit definition. reboot

Re: [systemd-devel] Generators, Targets and Stater Units - I am holding it wrong?

2025-06-23 Thread Nils Kattenbeck
Hi Marc, it has been a while since working with generators but I think the correct solution is to ensure that the system-presets are configured such that you generated units are enabled by default. Debian for example has a fallback which applies a default preset of disabled for all units unless sp

[systemd-devel] Doc issue: does BindsTo wait for a service to become active?

2025-06-23 Thread Christopher Hunt
Howdy, I’m looking for some clarification on BindsTo as I’m wondering if there’s some clarification required in the doc (1). I think I’m perhaps misinterpreting what the doc is referring to as “active" i.e: "When used in conjunction with After= on the same unit the behaviour of BindsTo= is eve

Re: [systemd-devel] Generators, Targets and Stater Units - I am holding it wrong?

2025-06-23 Thread Lennart Poettering
On So, 22.06.25 22:30, Marc Haber (mh+systemd-de...@zugschlus.de) wrote: > Hi, > > the following works, but I doubt that it is a nice way to do it. I have a > generator that generates a number of service, and I want all of those > services automatically started at boot. I have: > > $ sudo systemct

Re: [systemd-devel] Doc issue: does BindsTo wait for a service to become active?

2025-06-23 Thread Christopher Hunt
> On 23 Jun 2025, at 4:12 PM, Andrei Borzenkov wrote: > > How A.service and B.service are started exactly? systemctl enable A systemctl enable B reboot

Re: [systemd-devel] Doc issue: does BindsTo wait for a service to become active?

2025-06-23 Thread Christopher Hunt
Here are my sample unit files extracted from my real ones. Firstly, here is an example of Service A: [Unit] Description=Service A After=network.target [Service] Type=notify NotifyAccess=all ... [Install] WantedBy=multi-user

Re: [systemd-devel] Generators, Targets and Stater Units - I am holding it wrong?

2025-06-23 Thread Marc Haber
On Mon, Jun 23, 2025 at 12:47:35AM +0200, Nils Kattenbeck wrote: it has been a while since working with generators but I think the correct solution is to ensure that the system-presets are configured such that you generated units are enabled by default. Debian for example has a fallback which app

Re: [systemd-devel] Generators, Targets and Stater Units - I am holding it wrong?

2025-06-23 Thread Andrei Borzenkov
23.06.2025 10:48, Marc Haber wrote: On Mon, Jun 23, 2025 at 09:34:34AM +0300, Andrei Borzenkov wrote: 23.06.2025 09:28, Marc Haber wrote: On Mon, Jun 23, 2025 at 09:16:58AM +0300, Andrei Borzenkov wrote: /run/systemd/generator/console-log-starter.service.wants/console-log-9.service -> /run/sys

Re: [systemd-devel] Generators, Targets and Stater Units - I am holding it wrong?

2025-06-23 Thread Marc Haber
On Mon, Jun 23, 2025 at 09:16:58AM +0300, Andrei Borzenkov wrote: /run/systemd/generator/console-log-starter.service.wants/console-log-9.service -> /run/systemd/generator/console-log-9.service So your recommendation is to do away with the target, keep the enabled static starter.service and add