| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handling of /etc/hosts is highly site- and admin- specific in
many more complex cases, and it's exceedingly hard and error-
prone for NetworkManager to handle all those cases. So remove
this functionality entirely. That's not a big loss, as it
turns out there's a much more elegant solution.
The only requirement is that the machine's hostname map back
to an IP address owned by the machine. That requirement can
be satisifed by nss-myhostname or even possibly the distro's
installer. If the user does not want nss-myhostname then it
can be uninstalled. Distros should use a "recommends" feature
in their packaging system so that the NetworkManager package
does *not* have a hard requirement on nss-myhostname. Thus
everyone is happy; things Just Work when nss-myhostname is
installed, but more advanced users can uninstall it and
customize /etc/hosts as they wish.
Another alternative is a dispatcher script that listents for
the 'hostname' event, and updates /etc/hosts according to the
administrator's preference.
|
|
|
|
|
|
| |
Try to preserve custom hostnames (ie, anything not a localhost* variant,
the current hostname, or the previous hostname) when rewriting the
127.0.0.1/::1 localhost mapping lines.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of always mapping the current hostname to 127.0.0.1 or
whatever the user mapped it to manually, make sure the hostname
maps to the default device's IPv4 and IPv6 address if there's
a default device.
This helps out services that do a lookup on the machine hostname
to determine the IP address, which while a broken behavior (since
there are too many edge-cases) is pretty wide-spread and thus
we should support it.
|
|
|
|
|
|
|
| |
In preparation for updating /etc/hosts to assign the current hostname
to the current IP address to allow programs that (somewhat incorrectly)
do DNS lookups on the machine's current hostname to find out its
IP address.
|
| |
|
|
If the hostname was changed while NM wasn't running, and thus /etc/hosts
was out of sync with the new hostname, NM wouldn't make sure that
the new hostname was mapped in /etc/hosts. Make sure that happens
and add a bunch of testcases for /etc/hosts rewriting.
|