Login prompt

Gerard Beekmans gerard at linuxfromscratch.org
Mon Jul 10 17:50:13 PDT 2000

> The only way to do this is to set the hostname incorrectly
> # hostname cascade

It might be incorrect, but it's common practice. The resolver library
should be able to handle it just fine though, as long as the hostname is
listed in /etc/hosts

gerard:~$ hostname
gerard:~$ hostname -vf
Resolving `lfs' ...
Result: h_name=`lfs.linuxfromscratch.org'
Result: h_aliases=`lfs'
Result: h_addr_list=`'

As you see it's able to resolve my FQDN through /etc/hosts.

> But that is no good - I need it to show the proper hostname when I type
> hostname.  I already have an alias in my /etc/hosts file.
> # Begin /etc/hosts
>       localhost
>     cascade.veldy.net       cascade
> # End /etc/hosts
> I still get the wrong prompt (with FQHN).

Weird yes.
I have noticed that sometimes (not sure why. Can be the way glibc is
compiled or whatever) you need to come up with a FQDN for as
well. A commonly used entry is: localhost.localdomain localhost

As long as the first entry contains a dot somewhere it's considered a
FQDN. That might fix things but perhaps not.

It would help if you can give the output of 'hostname -vf'

Gerard Beekmans

-*- If Linux doesn't have the solution, you have the wrong problem -*-
Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
Unsubscribe: email lfs-discuss-request at linuxfromscratch.org and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)

More information about the lfs-dev mailing list