summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2005-03-22 15:51:44 +0000
committerChris Lumens <clumens@redhat.com>2005-03-22 15:51:44 +0000
commitf96004d8afef4a2925059e4c56854acfb6730c87 (patch)
treeafce5ec7c7525bd82f583a9c985eb07b362a883e
parentf059b315bd362cea0140fc32f488d19bbecf3c38 (diff)
downloadanaconda-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.
-rw-r--r--dispatch.py2
-rw-r--r--iw/network_gui.py17
2 files changed, 11 insertions, 8 deletions
diff --git a/dispatch.py b/dispatch.py
index cd8d803f9..42618cee1 100644
--- a/dispatch.py
+++ b/dispatch.py
@@ -100,7 +100,7 @@ installSteps = [
("bootloaderadvanced", ("dispatch", "id.bootloader", "id.fsset",
"id.diskset")),
("networkdevicecheck", networkDeviceCheck, ("id.network", "dispatch")),
- ("network", ("id.network", "dir", "intf")),
+ ("network", ("id.network", "dir", "intf", "id")),
("firewall", ("intf", "id.network", "id.firewall", "id.security")),
("languagesupport", ("id.langSupport",)),
("timezone", ("id.instLanguage", "id.timezone")),
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: