Description of problem: Current hostname manpage doc is misleading. Version-Release number of selected component (if applicable): From manpage: net-tools 28 Jan 1996 HOSTNAME(1) rpm -q net-tools net-tools-1.60-37 How reproducible: Always. Steps to Reproduce: 1. hostname <mynewhostname> 2. reboot 3. Actual results: hostname will be localhost. Expected results: hostname should be <mynewhostname> OR we should change the hostname documentation so that people don't think it changed the hostname permanently. Additional info: I know that one must change /etc/sysconfig/network and /etc/hosts to get a new properly working hostname. Either we should change how hostname works on RH installations OR we should change the manpage to tell people that it doesn't work on RH machines OR we should leave hostname (and other functions/options that don't work properly) out of RH machines. To have a manpage that is wrong is the worst sin as far as I am concerned.
hostname just calls sethostname(const char *name, size_t len) for setting the name and doesn't touch the conf files itself. I'm reassigning this to glibc for futher comments.
One additional comment that also can suit here. If you change the hostname in s-c-network it does not automatically change your /etc/hosts! If the new hostname does not resolv to a IP address through DNS or /etc/hosts, it is added to localhost.
Fixed in net-tools-1.60-41. Note into man page added.
Thanks for making this change. I'm impressed that it was given consideration and acted on.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2005-052.html
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2005-445.html