Red Hat Bugzilla – Bug 392691
ifup-post setups hostname with no user option controlling it
Last modified: 2007-11-30 17:07:49 EST
Description of problem:
ifup sets a hostname for eth interfaces and the user has no control of it.
Version-Release number of selected component (if applicable):
Have a eth interface connected to the internet and set it up with a static IP
Have a PTR record for this IP address.
Make sure your domain name is one of 'localhost' or 'localhost.localdomain' and
start the interface.
Steps to Reproduce:
1. ifup eth0
Your hostname changes to the value in the PTR record
Well, it should change, but we need some control over it, because for some
reason a user would like it to stay localhost.localdomain or just localhost.
I suggest adding a NEED_HOSTNAME value in each interface configured.
In case it's NEED_CONFIG=no, we won't calculate a new hostname for it.
I'm suggesting a patch to resolve that issue for the file
The patch is in front of
On ppp and plip interfates this does not happen (witness it in
Created attachment 265101 [details]
Patch to network-functions to enable the NEED_HOSTNAME flag
Why would you want to keep a localhost hostname?
My case is configuring a computer with certain settings.
Then later connecting it to the Internet and suddenly getting a new hostname.
Some applications / settings which depended on it failed to run.
I believe that this unexpected / surprising hostname change is somewhat
problematic. Besides, the suggested patch does not interfere with any other
behavior which is currently implemented.
This is expected behavior in pretty much every release since the old Red Hat
Linux days - if a static hostname is expected, just setting it to something
other than localhost should do the trick.
Expected behavior is preserved but more flexibility is added.
I would like to keep a localhost.localdomain hostname regardless of what's
happening. It's not that awkward.