<div dir="ltr">> Alternatively, you actually can issue daemon reload during the boot process<div><br></div><div>Suppose I use a systemd service (say foo.service) to do this, is it a supported/recommended practice to do a daemon reload as part of a unit's activation (i.e., through its ExecStart)?</div><div>I want my new units to block default.target. Is it safe to issue a `systemctl start default.target` with foo.service' ExecStart or ExecStartPost?<br><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 10, 2018 at 3:30 AM Lennart Poettering <<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Do, 09.08.18 10:20, Daniel Wang (<a href="mailto:wonderfly@google.com" target="_blank">wonderfly@google.com</a>) wrote:<br>
<br>
> Hi,<br>
> <br>
> I want to append to systemd's unit search path a directory on my OEM<br>
> partition, which is mounted  by a .mount unit, at /usr/share/. I will be<br>
> putting unit files in that partition, some of which I want to run before<br>
> default.target. Is it possible to do so without a systemctl<br>
> daemon-reload?<br>
<br>
/usr/share appears like a surprising place for this…<br>
<br>
In general, in systemd the assumption is that unit files are available<br>
during earliest boot, so that the initial transaction can be<br>
calculated with all units taken into account. Hence a relatively clean<br>
solution might be to mount your partition already in the initrd, so<br>
that systemd sees it in place already.<br>
<br>
Alternatively, you actually can issue daemon reload during the boot<br>
process, but you'd have to enqueue the new units appearing explicitly,<br>
i.e. trigger a second transaction because what isn't there won't be<br>
considered in the initial one.<br>
<br>
Lennart<br>
<br>
-- <br>
Lennart Poettering, Red Hat<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div>Best,</div><div>Daniel</div></div></div>