Thanks heaps to all the responses I got:
Brion Leary, Eric R. Ramelli, Rich Casto, Dan Brainard, Asim Zuberi, 
Nickolai Zeldovich, Toby Potts, Glenn Satchell, Parthiv Shah, Shriman Gurung,
Peter M Allan, Casper Dik, Stefan Voss, Christine Komma.
My original question:
---------------------------------------------------------------------------
If my /etc/nodename is xyz, can I have my machine name in /etc/hosts:
 
a.b.c.d xyz.company.com
a.b.c.d xyz
a.b.c.d loghost
 
like this? Will the ordering of these lines matter? We're running 2.5.1 with 
"files dns" in nsswitch.conf.
We're trying to work around a software error and the vendor suggested us
to do the above.
---------------------------------------------------------------------------
A point of clarification is needed. My current /etc/hosts has:
a.b.c.d xyz.company.com xyz loghost
instead of the splitted lines and has been working for the last 3 years.
>From the responses, my current /etc/hosts is the correct way to approach 
things. However, the splitted approach may also work, from Toby Potts:
     you can have your entries listed in the manner which you have 
     outlined, however, be careful not to switch the order.  some software 
     packages read this file to get the hostname (not sure why here) and if 
     you change the order, the software configuration will not recognize 
     the "new" hostname.  we had this problem with Legato Networker and the 
     same with OpenVision Netbackup, after one of our admins mistakenly 
     switched the order of the lines in the /etc/hosts file.  This hostname 
     information is contained in several different files throughout the 
     system,
     
           (these are probably of some interest)
     
     /etc/nodename
     /etc/hostname.??[0-9]
     /etc/hosts ---> /etc/inet/hosts
     /etc/net/*/hosts
     /var/yp/aliases
     /var/yp/binding/*/ypservers
 
     and each software developer seems to code to look at a different file for 
     this information
Thanks for your help,
Kai
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:00 CDT