On 19.06.2021 11:00, Norbert Lange wrote:
>>
>> What you could try is creating a new unit in /etc/systemd/system/
>> --- systemd-reload.service ---
>> [Unit]
>> Description=Reload systemd
>> Requires=usr-local.mount
>> After=usr-local.mount
>>
>> [Service]
>> Type=oneshot
>> ExecStart=/usr/bin/systemctl --no-block daemon-reload
>>
>> [Install]
>> WantedBy=usr-local.mount
>> ---
>> and than a »systemctl daemon-reload && systemctl enable systemd-
>> reload.service«.
>> In theory (because completly untested) this unit should be activated as
>> soon as your /usr/local mount point is ready.
> 
> Yeah, I did something similar. systemd seems to get the new targets,
> including adding the sysinit.wants symlinks to sysinit.target.
> But doesn't start them.
> 

As already explained systemd builds "transaction" (set of units that are
dependencies of default.target) once on boot and does not reevaluate it.
To start newly available units you need to actually request to start
them. I.e. you would need something like

systemctl --no-block start usr-local.target

where usr-local.target pulls in those units in /usr/local.
usr-local.target can itself be on /usr/local. As you need to configure
your units in /usr/local as dependencies anyway, you can just as well
add them as dependency to usr-local.target instead of sysinit.target.
You can actually have both in case /usr/local will be available early.
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to