summaryrefslogtreecommitdiffstats
path: root/textw
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-06-16 20:47:15 +0000
committerJeremy Katz <katzj@redhat.com>2004-06-16 20:47:15 +0000
commit8e00115e4bd6e40995d66edb89d5a1bb906a9db1 (patch)
tree3ba5637d32cb80097ec05228e1b5a2c545bf4b53 /textw
parentdd303e55bafd6f975bbae43eef5933d91c213fb6 (diff)
downloadanaconda-8e00115e4bd6e40995d66edb89d5a1bb906a9db1.tar.gz
anaconda-8e00115e4bd6e40995d66edb89d5a1bb906a9db1.tar.xz
anaconda-8e00115e4bd6e40995d66edb89d5a1bb906a9db1.zip
allow setting the essid and wep key in the second stage for wireless cards too
Diffstat (limited to 'textw')
-rw-r--r--textw/network_text.py31
1 files changed, 21 insertions, 10 deletions
diff --git a/textw/network_text.py b/textw/network_text.py
index 0f3ec8a92..3b8a20f03 100644
--- a/textw/network_text.py
+++ b/textw/network_text.py
@@ -39,7 +39,7 @@ class NetworkDeviceWindow:
else:
sense = FLAGS_RESET
- for n in self.entries.values():
+ for n in self.dhcpentries.values():
n.setFlags (FLAG_DISABLED, sense)
def calcNM(self):
@@ -65,12 +65,17 @@ class NetworkDeviceWindow:
if not boot:
boot = "dhcp"
- options = [(_("IP Address"), "ipaddr"),
- (_("Netmask"), "netmask")]
+ options = [(_("IP Address"), "ipaddr", 1),
+ (_("Netmask"), "netmask", 1)]
if (isPtpDev(dev.info["DEVICE"])):
- newopt = (_("Point to Point (IP)"), "remip")
+ newopt = (_("Point to Point (IP)"), "remip", 1)
options.append(newopt)
+ if isys.isWireless(dev.info["DEVICE"]):
+ wireopt = [(_("ESSID"), "essid", 0),
+ (_("Encryption Key"), "key", 0)]
+ options.extend(wireopt)
+
descr = dev.get("desc")
if descr is not None and len(descr) > 0:
toprows = 2
@@ -112,7 +117,8 @@ class NetworkDeviceWindow:
row = currow
self.entries = {}
- for (name, opt) in options:
+ self.dhcpentries = {}
+ for (name, opt, dhcpdep) in options:
botgrid.setField(Label(name), 0, row, anchorLeft = 1)
entry = Entry (16)
@@ -120,6 +126,8 @@ class NetworkDeviceWindow:
botgrid.setField(entry, 1, row, padding = (1, 0, 0, 0))
self.entries[opt] = entry
+ if dhcpdep:
+ self.dhcpentries[opt] = entry
row = row + 1
self.dhcpCb.setCallback(self.setsensitive)
@@ -170,14 +178,17 @@ class NetworkDeviceWindow:
bc = ""
dev.set(("bootproto", "static"))
-
- for val in self.entries.keys():
- if self.entries[val].value():
- dev.set((val, self.entries[val].value()))
-
if bc and net:
dev.set(("broadcast", bc), ("network", net))
+ for val in self.entries.keys():
+ if ((self.dhcpCb.selected() != 0) and
+ self.dhcpentries.has_key(val)):
+ continue
+ if self.entries[val].value():
+ dev.set((val, self.entries[val].value()))
+
+
break
screen.popWindow()