summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2002-06-12 04:53:12 +0000
committerMike Fulbright <msf@redhat.com>2002-06-12 04:53:12 +0000
commit9d9a52521140926fe2303a3ff0620736cfe3e093 (patch)
tree59af67d93915371f4b14c9725a18dc64a025470d /iw
parent8ebe60d6333894695b4e43bb23f378b65d551d35 (diff)
downloadanaconda-9d9a52521140926fe2303a3ff0620736cfe3e093.tar.gz
anaconda-9d9a52521140926fe2303a3ff0620736cfe3e093.tar.xz
anaconda-9d9a52521140926fe2303a3ff0620736cfe3e093.zip
use field in network object to set if dhcp hostname is being overridden manually or not
Diffstat (limited to 'iw')
-rw-r--r--iw/network_gui.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/iw/network_gui.py b/iw/network_gui.py
index e7b96bee0..7b9711f4f 100644
--- a/iw/network_gui.py
+++ b/iw/network_gui.py
@@ -51,6 +51,7 @@ class NetworkWindow(InstallWindow):
if not rc:
raise gui.StayOnScreen
+ override = 0
if self.hostnameManual.get_active():
hname = string.strip(self.hostnameEntry.get_text())
neterrors = network.sanityCheckHostname(hname)
@@ -62,8 +63,10 @@ class NetworkWindow(InstallWindow):
raise gui.StayOnScreen
newHostname = hname
+ override = self.anyUsingDHCP()
else:
newHostname = "localhost.localdomain"
+ override = 0
if not self.anyUsingDHCP():
tmpvals = {}
@@ -116,6 +119,7 @@ class NetworkWindow(InstallWindow):
next = self.ethdevices.store.iter_next(iter)
self.network.hostname = newHostname
+ self.network.overrideDHCPhostname = override
return None
@@ -484,7 +488,7 @@ class NetworkWindow(InstallWindow):
# figure out if they have overridden using dhcp for hostname
if self.anyUsingDHCP():
- if self.hostname != "localhost.localdomain":
+ if self.hostname != "localhost.localdomain" and self.network.overrideDHCPhostname:
self.hostnameManual.set_active(1)
else:
self.hostnameUseDHCP.set_active(1)
@@ -512,7 +516,7 @@ class NetworkWindow(InstallWindow):
self.globals[global_options[t]] = options[t]
# bring over the value from the loader
- if(self.network.hostname != "localhost.localdomain"):
+ if self.network.hostname != "localhost.localdomain" and self.network.overrideDHCPhostname:
self.hostnameEntry.set_text(self.network.hostname)
if not self.anyUsingDHCP():