:: Re: [DNG] new freedesktop "standard…
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Olaf Meeuwissen
Ημερομηνία:  
Προς: dng
Αντικείμενο: Re: [DNG] new freedesktop "standard": /etc/machine-id

fsmithred via Dng writes:

> On Sat, 9 Mar 2019 16:27:10 +0100
> Arnt Karlsen <arnt@???> wrote:
>
>> On Sat, 9 Mar 2019 14:04:13 +0100, al3xu5 wrote in message
>> <20190309130422.386F8F60496@???>:
>> >
>> > I wonder... is it a "fixed" id for all Devuan installation as it
>> > seems to be?
>>
>> ..yes and no and no etc, I have:
>> nb6:~# hostid #Devuan Jessie
>> 007f0101
>> sda3:~# hostid #Devuan Ascii
>> 007f0100
>> devuan:~# hostid #Devuan Ascii on rPi-1
>> 007f0100
>> rir:~# hostid #Raspian Jessie
>> 00000000
>> devuan@dvn:~$ hostid #Devuan Ascii Live usb
>> 00000000
>
> I get 007f0100 on one jessie, 007f0101 on another jessie and 007f0101
> on ascii. (Three different computers)
>
> The ascii install is on a laptop that has several installations. When I
> reboot it into jessie, I get 007f0100. Ceres on that same box gives me
> 007f0100.


All the info I have seen on this topic in the thread is consistent with
hostid returning the "mangled" IP address belonging to the machine's
current hostname. This is normally set from /etc/hostname. That file
is created during installation. The IP address is in /etc/hosts.

Taking 007f0100 as an example, swapping bytes in pairs gives 7f000001
which gives 127.0.0.1. For 007f0101 you get 127.0.1.1.

I just tried the following on my machine

  $ sudo hostname yoda   # anything different from what you have now
  $ hostid               # this is silent for a while and then says
  00000000


Presumably, DNS times out and then you get whatever the code used to
initialize the return value.

Trying to revert my change

$ sudo hostname quark # this ponders things for a while and says
sudo: unable to resolve host yoda
$ hostid
007f0101

Please note that the hostname command does *not* modify the contents of
/etc/hostname. To persist changes across reboots you'll need to edit
/etc/hostname yourself.

Hope this helps,
--
Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Software                        https://my.fsf.org/donate
 Join the Free Software Foundation              https://my.fsf.org/join