summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorPaul Nasrat <pnasrat@redhat.com>2004-08-02 09:32:00 +0000
committerPaul Nasrat <pnasrat@redhat.com>2004-08-02 09:32:00 +0000
commitc0411c443aec00a29311961bfd8f37c493757782 (patch)
tree7a40a437ae126867e88b7d8ce4a6cc8584032cc8 /iw
parentbebcb3ce8c0f9665fb17955a8421cc36aa5a9c39 (diff)
downloadanaconda-c0411c443aec00a29311961bfd8f37c493757782.tar.gz
anaconda-c0411c443aec00a29311961bfd8f37c493757782.tar.xz
anaconda-c0411c443aec00a29311961bfd8f37c493757782.zip
Hostname changes persist when editing devices (#127881)
Diffstat (limited to 'iw')
-rw-r--r--iw/network_gui.py28
1 files changed, 12 insertions, 16 deletions
diff --git a/iw/network_gui.py b/iw/network_gui.py
index 520d2b0e2..30b0c1976 100644
--- a/iw/network_gui.py
+++ b/iw/network_gui.py
@@ -134,13 +134,15 @@ class NetworkWindow(InstallWindow):
dev.set(("ONBOOT", onboot))
def setHostOptionsSensitivity(self):
- if not self.anyUsingDHCP():
- self.hostnameManual.set_active(1)
+ # figure out if they have overridden using dhcp for hostname
+ if self.anyUsingDHCP():
+ if self.hostname != "localhost.localdomain" and self.network.overrideDHCPhostname:
+ self.hostnameManual.set_active(1)
+ self.hostnameManual.set_sensitive(1)
+ else:
+ self.hostnameUseDHCP.set_active(1)
else:
- self.hostnameUseDHCP.set_active(1)
-
- self.hostnameUseDHCP.set_sensitive(self.anyUsingDHCP())
-
+ self.hostnameManual.set_active(1)
def setIPTableSensitivity(self):
numactive = self.getNumberActiveDevices()
@@ -468,9 +470,11 @@ class NetworkWindow(InstallWindow):
return self.ethdevices
def hostnameUseDHCPCB(self, widget, data):
+ self.network.overrideDHCPhostname = 0
self.hostnameEntry.set_sensitive(not widget.get_active())
def hostnameManualCB(self, widget, data):
+ self.network.overrideDHCPhostname = 1
if widget.get_active():
self.hostnameEntry.grab_focus()
@@ -553,16 +557,8 @@ class NetworkWindow(InstallWindow):
box.pack_start(frame, gtk.FALSE, gtk.FALSE)
- # figure out if they have overridden using dhcp for hostname
- if self.anyUsingDHCP():
- if self.hostname != "localhost.localdomain" and self.network.overrideDHCPhostname:
- self.hostnameManual.set_active(1)
- self.hostnameManual.set_sensitive(1)
- else:
- self.hostnameUseDHCP.set_active(1)
- else:
- self.hostnameManual.set_active(1)
-
+ self.setHostOptionsSensitivity()
+
#
# this is the iptable used for DNS, et. al
self.ipTable = gtk.Table(len(global_options), 2)