[systemd-devel] [PATCH] hostnamectl: correct IDs for remote hosts
Lennart Poettering
lennart at poettering.net
Tue Jun 3 11:42:45 PDT 2014
On Sun, 01.06.14 22:03, Mantas Mikulėnas (grawity at gmail.com) wrote:
>
> On Sun, Jun 1, 2014 at 9:01 AM, Lennart Poettering
> <lennart at poettering.net> wrote:
> >
> > On Sat, 31.05.14 18:21, Rico Sagner (sagner at b1-systems.de) wrote:
> >
> > Heya!
> >
> > I think that the two ids would probably be better exposed by PID 1
> > istelf, instead of hostnamed. It's a bit difficult to come up with a
> > rule which props should be exposed from hostnamed and which ones from
> > PID1, but I think the rule should be something along the lines of "if
> > it's more an automatically determined property than a user or vendor
> > chosen one, and if PID 1 knows/caches it anyway then it belongs into PID
> > 1"...
> >
> > So, could you please move the machine/boot IDs into PID 1 instead of
> > hostnamed, next to where the Virtualization/Architecture properties are
> > defined?
>
> Out of curiosity, wouldn't the existing
> org.freedesktop.DBus.Peer.GetMachineId() work here?
True. That sounds like a good option. And in fact, we actually have a
high-level wrapper call for that: sd_get_owner_machine_id().
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list