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

Re: "hostname" question during Debian installation

Tom H wrote:
> Bob Proulx wrote:
> > Yes. And also to /etc/postfix/main.cf if postfix is installed.  Or to
> > other places if other MTAs are installed.
> When you use "dpkg-reconfigure exim4-config" or "dpkg-reconfigure
> postfix", "/etc/mailname" is updated; in postfix's case because "my
> origin" is set to it in "/etc/postfix/main.cf".

I thought it set 'myhostname'.  No?  I should try a pristine
installation and look.

> Mutt also uses it but it can be overridden by "~/.muttrc".

Doesn't mutt simply use `hostname`?

> >> 3) written to "message of the day" file
> >
> > No.  The /etc/motd doesn't include the hostname.  You are thinking of
> > /etc/issue but it also doesn't include the hostname either.  It
> > may include @char and \char sequences which substitute the dynamically
> > hostname at runtime though.
> "/etc/motd" is a symlink to "/var/run/motd", which is generated at
> boot by "/etc/init.d/bootlogs" and contains the output "uname -snrvm",
> so "/etc/motd" does contain a box's hostname.

You are right.  It does have the hostname.  But it isn't something
that needs to be updated.  It is fully dynamic.  I think it falls into
the category of things that /use/ the hostname but don't need to be
/set/ to it.

> >> 4) usually used in shell prompt(for example "\[\e]0;\u@\h:
> >> \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$")
> Like "/etc/issue" (where the hostname's set by "/n"), the hostname in
> the prompt's set
>  by "\h" so it's changed dynamically at boot.

Yep.  So nothing needs to be done about it.


Attachment: signature.asc
Description: Digital signature

Reply to: