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

2017-07-31 Thread Andrey Yurovsky
On Mon, Jul 31, 2017 at 9:27 AM, J Decker wrote: > There's an option under [dhcp] section > https://www.freedesktop.org/software/systemd/man/systemd.network.html > > SendHostname= > When true (the default), the machine's hostname will be sent to the DHCP > server. > >

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

2017-07-31 Thread J Decker
On Mon, Jul 31, 2017 at 7:38 AM, Andrey Yurovsky wrote: > On Mon, Jul 31, 2017 at 7:24 AM, Lennart Poettering > wrote: > > On Fr, 28.07.17 12:08, Andrey Yurovsky (yurov...@gmail.com) wrote: > > > >> I have an embedded target where the hostname is

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

2017-07-31 Thread Andrey Yurovsky
On Mon, Jul 31, 2017 at 7:24 AM, Lennart Poettering wrote: > On Fr, 28.07.17 12:08, Andrey Yurovsky (yurov...@gmail.com) wrote: > >> I have an embedded target where the hostname is expected to be a >> string derived in part from the MAC address of an Ethernet interface. >>

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

2017-07-31 Thread Lennart Poettering
On Fr, 28.07.17 12:08, Andrey Yurovsky (yurov...@gmail.com) wrote: > I have an embedded target where the hostname is expected to be a > string derived in part from the MAC address of an Ethernet interface. > I've been looking at how to properly set the system's hostname and > also have

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

2017-07-29 Thread Andrey Yurovsky
On Sat, Jul 29, 2017 at 1:26 AM, Mantas Mikulėnas wrote: > On Sat, Jul 29, 2017 at 9:00 AM, Andrey Yurovsky wrote: >> >> However I see the DHCP client use the original hostname the first time >> my target boots (I captured traffic and checked the DHCP

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

2017-07-29 Thread Mantas Mikulėnas
On Sat, Jul 29, 2017 at 9:00 AM, Andrey Yurovsky wrote: > However I see the DHCP client use the original hostname the first time > my target boots (I captured traffic and checked the DHCP Discover > contents). When I reboot the newly-booted system, /etc/hostname is > already

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

2017-07-29 Thread Andrey Yurovsky
On Fri, Jul 28, 2017 at 10:46 PM, Mantas Mikulėnas wrote: > > > On Sat, Jul 29, 2017, 08:13 Andrei Borzenkov wrote: >> >> 28.07.2017 22:08, Andrey Yurovsky пишет: >> > >> > Is there a correct way to replace or otherwise set the hostname and >> > have

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

2017-07-28 Thread Mantas Mikulėnas
On Sat, Jul 29, 2017, 08:13 Andrei Borzenkov 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

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

2017-07-28 Thread Andrei Borzenkov
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.