Bug 392691 - ifup-post setups hostname with no user option controlling it
ifup-post setups hostname with no user option controlling it
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts (Show other bugs)
5.1
All Linux
low Severity low
: ---
: ---
Assigned To: initscripts Maintenance Team
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-20 11:46 EST by Dan Fruehauf
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-20 12:16:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to network-functions to enable the NEED_HOSTNAME flag (448 bytes, patch)
2007-11-20 11:46 EST, Dan Fruehauf
no flags Details | Diff

  None (edit)
Description Dan Fruehauf 2007-11-20 11:46:33 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):
initscripts-8.45.17.EL-1

How reproducible:
Have a eth interface connected to the internet and set it up with a static IP
address.
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
  
Actual results:
Your hostname changes to the value in the PTR record

Expected results:
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
/etc/sysconfig/network-scripts/network-functions.
The patch is in front of 

Additional info:
On ppp and plip interfates this does not happen (witness it in
/etc/sysconfig/network-scripts/ifup-post).
Comment 1 Dan Fruehauf 2007-11-20 11:46:33 EST
Created attachment 265101 [details]
Patch to network-functions to enable the NEED_HOSTNAME flag
Comment 2 Bill Nottingham 2007-11-20 11:53:37 EST
Why would you want to keep a localhost hostname?
Comment 3 Dan Fruehauf 2007-11-20 12:11:19 EST
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.
Comment 4 Bill Nottingham 2007-11-20 12:16:39 EST
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.
Comment 5 Dan Fruehauf 2007-11-20 12:28:29 EST
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.

Note You need to log in before you can comment on or make changes to this bug.