summaryrefslogtreecommitdiffstats
path: root/textw
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2001-12-27 05:16:57 +0000
committerJeremy Katz <katzj@redhat.com>2001-12-27 05:16:57 +0000
commit345813c57c3fd10b66b10a1b544f7bd0f3950a7a (patch)
tree30623a2937aeacb2fc8026ce206c053e375249a9 /textw
parent26223b23aeb01e4b428c12fa5881280a21eaaec0 (diff)
downloadanaconda-345813c57c3fd10b66b10a1b544f7bd0f3950a7a.tar.gz
anaconda-345813c57c3fd10b66b10a1b544f7bd0f3950a7a.tar.xz
anaconda-345813c57c3fd10b66b10a1b544f7bd0f3950a7a.zip
whee! merge the first bunch of changes from the 390 branch. this
incorporates most of the python changes as well as the isys changes. email with what hasn't been applied coming later after I either finish merging the rest or decide to stop for the night
Diffstat (limited to 'textw')
-rw-r--r--textw/network_text.py22
-rw-r--r--textw/partition_text.py30
2 files changed, 45 insertions, 7 deletions
diff --git a/textw/network_text.py b/textw/network_text.py
index a820c178a..392a1691c 100644
--- a/textw/network_text.py
+++ b/textw/network_text.py
@@ -78,14 +78,22 @@ class NetworkWindow:
isOn = (boot == "dhcp"))
firstg.setField (self.cb, 0, 0, anchorLeft = 1)
- secondg = Grid (2, 6)
+ ask_ptp = None
+ if len(dev.info["DEVICE"]) >= 3 and dev.info["DEVICE"][:3] == "ctc":
+ ask_ptp = 1
+ secondg = Grid (2, 7)
+ else:
+ secondg = Grid (2, 6)
+
secondg.setField (Label (_("IP address:")), 0, 0, anchorLeft = 1)
secondg.setField (Label (_("Netmask:")), 0, 1, anchorLeft = 1)
secondg.setField (Label (_("Default gateway (IP):")), 0, 2, anchorLeft = 1)
secondg.setField (Label (_("Primary nameserver:")), 0, 3, anchorLeft = 1)
secondg.setField (Label (_("Secondary nameserver:")), 0, 4, anchorLeft = 1)
secondg.setField (Label (_("Ternary nameserver:")), 0, 5, anchorLeft = 1)
-
+ if ask_ptp:
+ secondg.setField (Label (_("Point to Point (IP):")), 0, 6, anchorLeft = 1)
+
self.ip = Entry (16)
self.ip.set (dev.get ("ipaddr"))
self.nm = Entry (16)
@@ -98,7 +106,11 @@ class NetworkWindow:
self.ns2.set (network.secondaryNS)
self.ns3 = Entry (16)
self.ns3.set (network.ternaryNS)
+ if ask_ptp:
+ self.ptp = Entry(16)
+ self.ptp.set (dev.get ("remip"))
+
self.cb.setCallback (self.setsensitive)
self.ip.setCallback (self.calcNM)
self.nm.setCallback (self.calcGW)
@@ -109,6 +121,8 @@ class NetworkWindow:
secondg.setField (self.ns, 1, 3, (1, 0, 0, 0))
secondg.setField (self.ns2, 1, 4, (1, 0, 0, 0))
secondg.setField (self.ns3, 1, 5, (1, 0, 0, 0))
+ if ask_ptp:
+ secondg.setField (self.ptp, 1, 6, (1, 0, 0, 0))
bb = ButtonBar (screen, (TEXT_OK_BUTTON, TEXT_BACK_BUTTON))
@@ -124,7 +138,7 @@ class NetworkWindow:
result = toplevel.run ()
if self.cb.selected ():
dev.set (("bootproto", "dhcp"))
- dev.unset ("ipaddr", "netmask", "network", "broadcast")
+ dev.unset ("ipaddr", "netmask", "network", "broadcast", "remip")
else:
try:
(net, bc) = isys.inet_calcNetBroad (self.ip.value (), self.nm.value ())
@@ -137,6 +151,8 @@ class NetworkWindow:
dev.set (("bootproto", "static"))
dev.set (("ipaddr", self.ip.value ()), ("netmask", self.nm.value ()),
("network", net), ("broadcast", bc))
+ if ask_ptp:
+ dev.set (("remip", ptp))
network.gateway = self.gw.value ()
network.primaryNS = self.ns.value ()
network.secondaryNS = self.ns2.value()
diff --git a/textw/partition_text.py b/textw/partition_text.py
index 52bea4ec5..6688a72bf 100644
--- a/textw/partition_text.py
+++ b/textw/partition_text.py
@@ -943,13 +943,23 @@ class PartitionWindow:
if type == "RAID":
self.editRaidRequest(request)
elif type == "NEW":
- self.editPartitionRequest(request, isNew = 1)
+ if iutil.getArch() == "s390" or iutil.getArch() == "s390x":
+ self.intf.messageWindow(_("Error"),
+ _("You must go back and use fdasd to initialize this partition"))
+ else:
+ self.editPartitionRequest(request, isNew = 1)
else:
self.editPartitionRequest(request)
def deleteCb(self):
partition = self.lb.current()
+ if (iutil.getArch() == "s390" or iutil.getArch() == "s390x") \
+ and type(partition) != type("RAID"):
+ self.intf.messageWindow(_("Error"),
+ _("DASD partitions can only be deleted with fdasd"))
+ return
+
if doDeletePartitionByRequest(self.intf, self.partitions, partition):
self.refresh()
@@ -987,11 +997,23 @@ class PartitionWindow:
col_label_align=[CENTER, CENTER,CENTER,CENTER,CENTER,CENTER])
self.g.add(self.lb, 0, 1)
- self.bb = ButtonBar (screen, ((_("New"), "new", "F2"), (_("Edit"), "edit", "F3"), (_("Delete"), "delete", "F4"), (_("RAID"), "raid", "F11"), TEXT_OK_BUTTON, TEXT_BACK_BUTTON))
+ if iutil.getArch() == "s390" or iutil.getArch() == "s390x":
+ self.bb = ButtonBar (screen, ((_("Edit"), "edit", "F3"),
+ (_("Delete"), "delete", "F4"),
+ (_("RAID"), "raid", "F11"),
+ TEXT_OK_BUTTON, TEXT_BACK_BUTTON))
+ screen.pushHelpLine( _(" F1-Help F3-Edit F4-Delete F5-Reset F12-OK "))
+ else:
+ self.bb = ButtonBar (screen, ((_("New"), "new", "F2"),
+ (_("Edit"), "edit", "F3"),
+ (_("Delete"), "delete", "F4"),
+ (_("RAID"), "raid", "F11"),
+ TEXT_OK_BUTTON, TEXT_BACK_BUTTON))
+
+ screen.pushHelpLine( _(" F1-Help F2-New F3-Edit F4-Delete F5-Reset F12-OK "))
+
self.g.add(self.bb, 0, 2, (0, 1, 0, 0))
self.g.addHotKey("F5")
- screen.pushHelpLine( _(" F1-Help F2-New F3-Edit F4-Delete F5-Reset F12-OK "))
-
self.populate()
while 1: