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

Re: gethostname library function



>Looking at the function in the library, it seems to do the following:
>
>	o Check for a HOSTNAME environment variable
>	o Look for a file /local/hostname and use the contents
>
>I think it would be more unix-like to reverse the order of those 2
>things, and make the file /etc/hostname rather than /local/hostname.
>I suppose to maintain compatibility, it will have to do:
>
>	o Look for a file /etc/hostname and use the contents
>	o Check for a HOSTNAME environment variable
>	o Look for a file /local/hostname and use the contents
>
>Comments ?

I agree, even better would be not to trust the HOSTNAME environment
variable! :-)

I believe MiNT should hold at least two things..
	A hostname
	A domainname

In a root read-writable, non-root read-only shared memory segment.

It would be nice if it could hold other such information as well (such as
possibly an IP address etc).

>
>Simon.
>

Steve

-- 
---------------------------------------------------------------------------
Computer Systems Administrator, Dept. of Earth Sciences, Oxford University.
E-Mail: steve@uk.ac.ox.earth (JANET) steve@earth.ox.ac.uk (Internet).
Tel:- Oxford (0865) 282110 (UK) or +44 865 282110 (International).