Comment 20 for bug 632896

Revision history for this message
In , Andrew (andrew-redhat-bugs) wrote :

I've heard that this bug was caused by a workaround added
to NetworkManager to accomodate a bug in glibc when dealing
with IPv6 and localhost name resolution.

Laurent, I've further worked around the problem by setting
the hostname in /etc/Networking/dispatcher.d. Its not pretty
but adding an executable file in this directory containing :

#!/bin/sh
case "$2" in
 up)
  grep HOSTNAME /etc/sysconfig/network | cut -d= -f2 > /proc/sys/kernel/hostname
  ;;
 down)
  grep HOSTNAME /etc/sysconfig/network | cut -d= -f2 > /proc/sys/kernel/hostname
  ;;
esac

exit 0

works around NetworkManager setting the hostname to localhost.localdomain if it cannot write to /etc/hosts.