On 12/12/06, Claudio Capobianco <wbigger@...> wrote:
> This is the situation:
> -if I don't set ServerName, I get "gethostbyname:: Connection refused", but
> i can login as root@...)
> -if I set ServerName, doesn't matter if ServerName is the same of hostname
> or not, I haven't any error but I'm still root@...)
> in any case "echo $HOSTNAME" returns "(none)".
On the standard buildroot, there is a file called /etc/hostname that
contains the name of the host, and it defaults to:
# cat /etc/hostname
and if I do:
# echo $HOSTNAME
And, most importantly, the file /etc/inittab contains a line:
null::sysinit:/bin/hostname -F /etc/hostname
This is where the hostname actually gets set.
/etc/profile contains a line:
which is how the HOSTNAME environment variable gets set.
Vancouver, BC, Canada