I was actually able to reproduce the issue of Network Manger putting a bad /etc/hosts using Fedora with the following steps:
- remove hostname set from /etc/sysconfig/network
- remove all contents of /etc/hosts
- reboot
- Network manager puts invalid /etc/hosts
So to get into this situation isn't easy. Though if you are installing from a preseed file may actually have this case for Ubuntu.
I also submitted fixes for the invalid file upstream. Though following these steps on Ubuntu doesn't seem to lead to the results that where hit. Will have to try again.
I was actually able to reproduce the issue of Network Manger putting a bad /etc/hosts using Fedora with the following steps: network
- remove hostname set from /etc/sysconfig/
- remove all contents of /etc/hosts
- reboot
- Network manager puts invalid /etc/hosts
So to get into this situation isn't easy. Though if you are installing from a preseed file may actually have this case for Ubuntu.
I also submitted fixes for the invalid file upstream. Though following these steps on Ubuntu doesn't seem to lead to the results that where hit. Will have to try again.