Dear systemd developers,

Sorry for my very bad english.

We use the hostname provided by DHCP to start the right subset of our
applications on each of our machines (in other words the transient
hostname is used as predictable machine identifier).

Make it works on the ancient SysV is straightforward but I can't find
a (reasonable) way to achieve the same goal with systemd. We already
use both "Requires" and "After" with "network-online.target
nss-lookup.target" into our units but it isn't enough. When our units
start they obtain "localhost" from %H specifier. We don't find a way
to wait for (transient) hostname to be configured. The only solution
that it seems to work is to replace our binary in ExecStart with a
script which make a busy-loop until `hostname` output doesn't differ
from "localhost".

Is there a better way?

Thank you very much!

Ciao,
Alessio

Reply via email to