[systemd-devel] systemd and hostname supplied by DHCP

Alessio Igor Bogani alessioigorbogani at gmail.com
Fri Oct 2 05:00:21 PDT 2015


Hi,

On 29 September 2015 at 13:53, Alessio Igor Bogani
<alessioigorbogani at gmail.com> wrote:
> Hi David,
>
> On 28 September 2015 at 16:05, David Timothy Strauss
> <david at davidstrauss.net> wrote:
>> On Mon, Sep 28, 2015 at 1:19 AM Alessio Igor Bogani
>> <alessioigorbogani at gmail.com> wrote:
> [...]
>>> The systemd 219 brought with Yocto "Fido" can't set hostname supplied
>>> by DHCP on my Beaglebone:
> [...]
>> "Could not set hostname: No route to host" sounds like systemd is trying to
>> resolve and ping the provided hostname. But, it's failing, and so systemd is
>> deciding that it's not a usable hostname. Doesn't seem related to the DHCP
>> protocol implementation at all.

If I enable debug:
Oct 02 08:10:43 localhost systemd-networkd[277]: Got message
type=error sender=:1.4 destination=:1.2 object=n/a interface=n/a
member=n/a cookie=5 reply_cookie=12 error=The name
org.freedesktop.PolicyKit1 was not provided by any .service files
Oct 02 08:10:43 localhost systemd-networkd[277]: eth0: Could not set
hostname: No route to host

Evidently Yocto builds systemd enabling polkit without provides it. So
I added it and an additional polkit's rule
(https://bugs.freedesktop.org/show_bug.cgi?id=81626) and my Beaglebone
retrieve and set host-name correctly.

I would prefer avoid PolicyKit. Moreover in the systemd 219's README
PolicyKit is stated as optional (line 141). So I have rebuild systemd
disabling policykit explicitly and it doesn't work:

Oct 02 13:35:10 localhost systemd-networkd[235]: Got message
type=error sender=:1.4 destination=:1.2 object=n/a interface=n/a
member=n/a cookie=4 reply_cookie=12 error=Permission denied
Oct 02 13:35:10 localhost systemd-networkd[235]: eth0            :
Could not set hostname: Permission denied

Do you have any tips?

Thank in advance!

Ciao,
Alessio


More information about the systemd-devel mailing list