diff options
author | Chris Lumens <clumens@redhat.com> | 2005-03-22 15:51:44 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2005-03-22 15:51:44 +0000 |
commit | f96004d8afef4a2925059e4c56854acfb6730c87 (patch) | |
tree | afce5ec7c7525bd82f583a9c985eb07b362a883e /iw | |
parent | f059b315bd362cea0140fc32f488d19bbecf3c38 (diff) | |
download | anaconda-f96004d8afef4a2925059e4c56854acfb6730c87.tar.gz anaconda-f96004d8afef4a2925059e4c56854acfb6730c87.tar.xz anaconda-f96004d8afef4a2925059e4c56854acfb6730c87.zip |
If we're doing a kickstart install and "interactive" is used, don't empty
out the nameserver information we got from DHCP when the network GUI is
displayed. This ensures that the /etc/resolv.conf we write out will have
nameserver entries.
Diffstat (limited to 'iw')
-rw-r--r-- | iw/network_gui.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/iw/network_gui.py b/iw/network_gui.py index dc943d2df..fc417ada6 100644 --- a/iw/network_gui.py +++ b/iw/network_gui.py @@ -40,6 +40,8 @@ class NetworkWindow(InstallWindow): def getNext(self): + import kickstart + if self.getNumberActiveDevices() == 0: rc = self.handleNoActiveDevices() if not rc: @@ -64,6 +66,10 @@ class NetworkWindow(InstallWindow): newHostname = "localhost.localdomain" override = 0 + # If we're not using DHCP, skip setting up the network config + # boxes. Otherwise, don't clear the values out if we are doing + # kickstart since we could be in interactive mode. Don't want to + # write out a broken resolv.conf later on, after all. if not self.anyUsingDHCP(): tmpvals = {} for t in range(len(global_options)): @@ -86,7 +92,7 @@ class NetworkWindow(InstallWindow): self.network.primaryNS = tmpvals[1] self.network.secondaryNS = tmpvals[2] self.network.ternaryNS = tmpvals[3] - else: + elif not isinstance (self.id.instClass, kickstart.KickstartBase): self.network.gateway = None self.network.primaryNS = None self.network.secondaryNS = None @@ -493,8 +499,9 @@ class NetworkWindow(InstallWindow): self.hostnameEntry.grab_focus() # NetworkWindow tag="netconf" - def getScreen(self, network, dir, intf): + def getScreen(self, network, dir, intf, id): self.intf = intf + self.id = id box = gtk.VBox(False) box.set_border_width(6) self.network = network @@ -598,11 +605,7 @@ class NetworkWindow(InstallWindow): # bring over the value from the loader self.hostnameEntry.set_text(self.network.hostname) -# -# for now always put info in the entries, even if we're using DHCP -# -# if not self.anyUsingDHCP() or 1: - if 1: + if not self.anyUsingDHCP(): if self.network.gateway: self.globals[_("Gateway")].hydrate(self.network.gateway) if self.network.primaryNS: |