summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-09-29 23:33:33 +0000
committerJeremy Katz <katzj@redhat.com>2003-09-29 23:33:33 +0000
commitc19496d833095c0ec60330c7540708b5488e5054 (patch)
treeda6b205ab472e84f2ee9ef3846e235a500af9d08
parentd4896383a9feb23164b78c15fdee9b710051cb2e (diff)
downloadanaconda-c19496d833095c0ec60330c7540708b5488e5054.tar.gz
anaconda-c19496d833095c0ec60330c7540708b5488e5054.tar.xz
anaconda-c19496d833095c0ec60330c7540708b5488e5054.zip
overridedhcp hostname if dhcp and --hostname specified
-rw-r--r--network.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/network.py b/network.py
index 519299d9b..d08093c91 100644
--- a/network.py
+++ b/network.py
@@ -155,8 +155,9 @@ class Network:
self.isConfigured = 0
self.hostname = "localhost.localdomain"
- # this is only currently used in GUI
- # elsewhere we test if the hostname is localhost.localdomain
+ # if we specify a hostname and are using dhcp, do an override
+ # originally used by the gui but overloaded now
+ # we also test in places if the hostname is localhost.localdomain
# to see if its been override. Need some consolidation in future.
self.overrideDHCPhostname = 0
@@ -183,6 +184,8 @@ class Network:
self.domains.append(info["DOMAIN"])
if info.has_key("HOSTNAME"):
self.hostname = info["HOSTNAME"]
+ if info.has_key("BOOTPROTO") and info["BOOTPROTO"] == "dhcp":
+ self.overrideDHCPhostname = 1
try:
f = open("/etc/resolv.conf", "r")