[systemd-devel] Waiting for (transient) hostname configuration
Luca Boccassi
bluca at debian.org
Wed Apr 20 15:30:36 UTC 2022
Be very careful about inserting daemon-reload in the boot process,
especially early. At best it will cause slow-downs, at worst lock ups.
On Wed, 2022-04-20 at 13:18 +0000, Sietse van Zanen wrote:
> Why not add:
>
> ExecStartPost=systemctl daemon-reload
>
> to systemd-networkd-wait-online.service?
>
>
> -Sietse
>
> ________________________________
> From: systemd-devel <systemd-devel-bounces at lists.freedesktop.org> on behalf of Alessio Igor Bogani <alessio.bogani at elettra.eu>
> Sent: Wednesday, April 20, 2022 12:54:11 PM
> To: Lennart Poettering
> Cc: systemd-devel at lists.freedesktop.org
> Subject: Re: [systemd-devel] Waiting for (transient) hostname configuration
>
> Hi Lennart,
>
> On Tue, 19 Apr 2022 at 11:41, Lennart Poettering <lennart at poettering.net> wrote:
> [...]
> > the unit files are *loaded*, i.e. typically at earliest boot, long
> > before they are actually *started*. Thus, if you change the hostname
>
> I understand now. It was the evaluation time of the specifier that I
> have missed. I have just realized that my question was dumb, sorry for
> that.
>
> [...]
> > use. If you use systemd-networkd, then the
> > sytemd-network-wait-online.service is what you want to use. If you
> > enable that then network-online.target should be the point where DHCP
> > is acquired and thus also the hostname in effect.
>
> I use systemd-networkd and systemd-networkd-wait-online is enabled but
> unfortunately it doesn't work anyway. I have also tried to request
> systemd to execute systemd-hostnamed "Before = nss-lookup.target" (*)
> without success.
> I left the little shell script inside to ExecStart to solve my problem
> waiting for a better solution.
>
> Thanks Lennart for time, consideration and kindness.
>
> Have a nice and safe day!
>
> Ciao,
> Alessio
>
> (*) All my Units use "After = network-online.target nss-lookup.target"
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20220420/73f7e180/attachment.sig>
More information about the systemd-devel
mailing list