summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-04-04 18:47:45 +0000
committerMatt Wilson <msw@redhat.com>2001-04-04 18:47:45 +0000
commit7fc07f2032ab0085a3f481a2f9fb124d68108b3c (patch)
treeea224c118b6844ad4ecda54ca3140bb16eaab9d2 /iw
parente94490d48b995bc2e0e3620105b7329241916fd5 (diff)
downloadanaconda-7fc07f2032ab0085a3f481a2f9fb124d68108b3c.tar.gz
anaconda-7fc07f2032ab0085a3f481a2f9fb124d68108b3c.tar.xz
anaconda-7fc07f2032ab0085a3f481a2f9fb124d68108b3c.zip
set up the default to onboot=yes, dhcp for the first device shown (to refelct prior behavior) (#31876)
Diffstat (limited to 'iw')
-rw-r--r--iw/network_gui.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/iw/network_gui.py b/iw/network_gui.py
index cade535a4..0fbb6ab86 100644
--- a/iw/network_gui.py
+++ b/iw/network_gui.py
@@ -172,6 +172,7 @@ class NetworkWindow (InstallWindow):
if not devs: return None
devs.keys ().sort ()
+ num = 0
for i in devs.keys ():
devbox = GtkVBox ()
align = GtkAlignment ()
@@ -182,8 +183,9 @@ class NetworkWindow (InstallWindow):
align = GtkAlignment ()
bootcb = GtkCheckButton (_("Activate on boot"))
- bootcb.set_active (devs[i].get ("onboot") and
- devs[i].get ("onboot") == "yes")
+ onboot = devs[i].get ("onboot")
+ bootcb.set_active ((num == 0 and not onboot)
+ or onboot == "yes")
bootcb.connect ("toggled", self.onBootToggled, devs[i])
align.add (bootcb)
@@ -199,7 +201,12 @@ class NetworkWindow (InstallWindow):
self.ipTable = GtkTable (len (options), 2) # this is the iptable used for DNS, et. al
DHCPcb.connect ("toggled", self.DHCPtoggled, (devs[i], ipTable))
- DHCPcb.set_active (devs[i].get ("bootproto") == "dhcp")
+ bootproto = devs[i].get ("bootproto")
+ # go ahead and set up DHCP on the first device
+ DHCPcb.set_active ((num == 0 and not bootproto)
+ or bootproto == "dhcp")
+
+ num = num + 1
forward = lambda widget, box=box: box.focus (DIR_TAB_FORWARD)