Hi, Ok, first things first. How to get something out of hostname -a.
Suppose your hostname is mycomputer. Suppose your /etc/hosts file looks like this: 127.0.0.1 localhost.localdomain localhost 192.168.1.1 mycomputer.mynet.org mycomputer Change it to look like this: 127.0.0.1 localhost.localdomain localhost 192.168.1.1 mycomputer.mynet.org mycomputertest mycomputer Now try hostname -a and you will get: mycomputertest mycomputer Which programs use this? I dont know to be honest. Candidates are all programs that want to know by which names is the current computer known by. Most obvious would be mail server configuration scripts trying to find out which names refer to this computer (so it can treat mails for that names as local). Another thing to take into account is that linux distributions are trying to standarize themselves so it isn't a pain to change from one to another. We should try to keep essential programs like hostname as standard as possible. Please note: The internet has many webpages and documents saying that hostname uses gethostbyname(), including the Debian manpage for hostname in stable. I understand that changing to getaddrinfo() and getnameinfo() is the future (as it is IPV6), so if it needs to be changed now please make sure that it is well advertised in the manpage, docs and everywhere else you can. Thanks. PS: Sorry about the mail relay, but I can't change it right now. On Tue, Aug 04, 2009 at 08:08:45PM +0200, Michael Stapelberg wrote: > Hi Alex, > > I am not sure which program would rely on the output of hostname -a. I am not > even sure about how to use it properly (!) set up your network to get > hostname -a to spit out anything. As far as i understand it, this is a feature > which relies on /etc/hosts. Feel free to point out any programs which require > it. > > So, to sum it up: I don???t see any problems with dropping it. If you do, we > can > change the patch to use gethostbyname() in this very special case. > > Best regards, > Michael > > PS: Unrelated to the issue here, you might want to use a host for delivering > your mail which is not listed in spam-blocklists: > > sendmail[215513513]: STARTTLS=server, relay=cm-83-97-167-247.telecable.es > [83.97.167.247], version=TLSv1/SSLv3, verify=NOT, cipher=AES256-SHA, > bits=256/256 > sendmail[215513513]: n74Dll3O215513513: ruleset=check_rcpt, > arg1=<michael+db20090...@stapelberg.de>, relay=cm-83 -97-167-247.telecable.es > [83.97.167.247], reject=550 5.7.1 <michael+db20090...@stapelberg.de>... > Rejected: 83.97.167.247 listed at zen.spamhaus.org > > > -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org