[systemd-devel] systemd/hostnamed: setting the hostname and using it in the DHCP Discover

Mantas Mikulėnas grawity at gmail.com
Sat Jul 29 05:46:02 UTC 2017


On Sat, Jul 29, 2017, 08:13 Andrei Borzenkov <arvidjaar at gmail.com> wrote:

> 28.07.2017 22:08, Andrey Yurovsky пишет:
> >
> > Is there a correct way to replace or otherwise set the hostname and
> > have systemd use it from the beginning and ensure that the DHCP client
> > specifies it in option 12?
> >
>
> Use generator to create /etc/hostname before systemd starts.
>

But afaik, generators only run before units are processed, but still after
applying the general config?

That said... Might the problem be that you only update the config in /etc
but don't apply it to the kernel via `hostname`? DHCP clients don't really
care about /etc/hostname.

> --

Mantas Mikulėnas <grawity at gmail.com>
Sent from my phone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170729/8e5d69cd/attachment.html>


More information about the systemd-devel mailing list