Re: [systemd-devel] systemd and hostname supplied by DHCP
Some guys set the following config in /etc/polkit-1/rules.d: polkit.addRule(function(action, subject) { if (action.id == "org.freedesktop.hostname1.set-hostname" && subject.user == "systemd-network") { return polkit.Result.YES; } }); Alternatively, I use the following config in /etc/polkit/localauthority/50-local.d of my Debian Jessie installation (I failed to make it apply polkit rules): [Allow systemd-networkd to set transient hostname from DHCP] Identity=unix-user:systemd-network Action=org.freedesktop.hostname1.set-hostname ResultAny=yes ResultInactive=yes ResultActive=yes Good luck! 2015-10-02 9:00 GMT-03:00 Alessio Igor Bogani: > Hi, > > On 29 September 2015 at 13:53, Alessio Igor Bogani > wrote: > > Hi David, > > > > On 28 September 2015 at 16:05, David Timothy Strauss > > wrote: > >> On Mon, Sep 28, 2015 at 1:19 AM Alessio Igor Bogani > >> 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 > ___ > systemd-devel mailing list > systemd-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/systemd-devel > -- *Laércio de Sousa* *Orientador de Informática* *Escola Municipal "Professor Eulálio Gruppi"* *Rua Ismael da Silva Mello, 559, Mogi Moderno* *Mogi das Cruzes - SPCEP 08717-390* Telefone: (11) 4726-8313 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd and hostname supplied by DHCP
Hi, On 29 September 2015 at 13:53, Alessio Igor Boganiwrote: > Hi David, > > On 28 September 2015 at 16:05, David Timothy Strauss > wrote: >> On Mon, Sep 28, 2015 at 1:19 AM Alessio Igor Bogani >> 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 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd and hostname supplied by DHCP
On Fri, Oct 02, 2015 at 02:00:21PM +0200, Alessio Igor Bogani wrote: > Hi, > > On 29 September 2015 at 13:53, Alessio Igor Bogani >wrote: > > Hi David, > > > > On 28 September 2015 at 16:05, David Timothy Strauss > > wrote: > >> On Mon, Sep 28, 2015 at 1:19 AM Alessio Igor Bogani > >> 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 My guess: do you have hostnamed installed? -- Tomasz Torcz ,,(...) today's high-end is tomorrow's embedded processor.'' xmpp: zdzich...@chrome.pl -- Mitchell Blank on LKML ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Showing a more accurate version of systemd with the git sha1
Hello, I'd like to know if it would be possible to show the git version (the one given by git-describe) when using the systemd binaries with --version option. That would be specially usefull when the systemd tree used to build the binary was not a released one. I'm really not an automake stuff expert, so it might be already possible to do that but I couldn't find it. Thanks. -- Francis ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Showing a more accurate version of systemd with the git sha1
02.10.2015 19:27, Francis Moreau пишет: Hello, I'd like to know if it would be possible to show the git version (the one given by git-describe) when using the systemd binaries with --version option. That would be specially usefull when the systemd tree used to build the binary was not a released one. This was already rejected. If you have convincing arguments ... https://github.com/systemd/systemd/pull/1164 I'm really not an automake stuff expert, so it might be already possible to do that but I couldn't find it. Thanks. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel