Re: Script Test [OT]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ed Greshko wrote:
> joachim.backes@xxxxxxxxxxxxxx wrote:
>   
>> Cameron Simpson wrote:
>>     
>>> On 08Sep2008 21:04, Kevin J. Cummings <cummings@xxxxxxxxxxxxxxxxxx>
>>> wrote:
>>>       
>>>> Alan Evans wrote:
>>>>         
>>>>> On Mon, Sep 8, 2008 at 6:40 AM, Steven Tardy <sjt5@xxxxxxxxxxxxxxx>
>>>>> wrote:
>>>>>           
>>>>>> kwhiskerz wrote:
>>>>>> man hostid
>>>>>>             
>>>>> On my Fedora 9...
>>>>> $ hostid
>>>>> 00000000
>>>>>
>>>>> Now I haven't bothered to check any other machines, but my initial
>>>>> impression is that this is not going to work...
>>>>>           
>>>> I just checked the hostids on my 2 primary machines on the same
>>>> local  network.  They just seem to be encodings of the machine's IP
>>>> addresses.  And since both are PC class machines, the addresses look
>>>> to be syllable swapped (but not byte swapped).
>>>>
>>>> 192.168.6.94 and 192.168.6.106
>>>> a8c05e06     and a8c06a06
>>>>
>>>> So, I have to ask, does the machine you tried it on have an IP address?
>>>>         
>>> So, let us turn to the docs: man hostid says:
>>>
>>>   hostid - print the numeric identifier for the current host
>>>   [...]
>>>   The full documentation for hostid is maintained as  a  Texinfo  manual
>>>   [...]
>>>
>>> Gah. I hate this info-so-no-f'n-man-page rubbish!
>>> But let's go: info hostid:
>>>     21.4 `hostid': Print numeric host identifier.
>>>   =============================================
>>>   `hostid' prints the numeric identifier of the current host in
>>>   hexadecimal.  This command accepts no arguments.  The only options are
>>>   `--help' and `--version'.  *Note Common options::.
>>>      For example, here's what it prints on one system I use:
>>>        $ hostid
>>>        1bac013d
>>>    On that system, the 32-bit quantity happens to be closely related
>>> to the
>>>    system's Internet address, but that isn't always the case.
>>>
>>> Gah! Again!
>>>
>>> I don't think I'd rely on hostid for anything:-(
>>>
>>> Cheers,
>>>       
>> Hi,
>>
>> seeing the same (using dhcp for getting an ip address):
>>
>> backes@eule [backes]: hostid
>> 00000000
>>
>> backes@eule [backes]: ifconfig
>> eth0      Link encap:Ethernet  HWaddr 00:0C:76:C0:40:36
>>           inet addr:192.168.179.182  Bcast:192.168.179.255
>> Mask:255.255.255.0
>>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>>           RX packets:284 errors:0 dropped:0 overruns:0 frame:0
>>           TX packets:256 errors:0 dropped:0 overruns:0 carrier:0
>>           collisions:0 txqueuelen:1000
>>           RX bytes:86392 (84.3 KiB)  TX bytes:25620 (25.0 KiB)
>>           Interrupt:22 Base address:0x2000
>>
>> Not seeing this effect on systems without dhcp usage.
>>
>> Regards
>>
>>     
> FYI, the hostid does not use information from ifconfig.  It looks for a
> match between "hostname -s" and information in /etc/hosts.  It then uses
> the IP address contained there.  No match then hostid returns 00000000.
>
>   
Oooopssss...

Correction.....

It uses hostname for the match....not "hostname -r"....

Also, it will take the info in /etc/hosts first and if no match will do
a DNS lookup.


-- 
He knew the tavernes well in every toun. -- Geoffrey Chaucer

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux