summaryrefslogtreecommitdiffstats
path: root/textw
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2005-09-12 20:59:59 +0000
committerJeremy Katz <katzj@redhat.com>2005-09-12 20:59:59 +0000
commit5714c77ba120dcd6f19afa40e87d1419fbaee238 (patch)
tree65ea3ef0cd529bac60242c276155363af1478b84 /textw
parenta4cfea5755c37ae042d6093c0eb81cc752f78a26 (diff)
downloadanaconda-5714c77ba120dcd6f19afa40e87d1419fbaee238.tar.gz
anaconda-5714c77ba120dcd6f19afa40e87d1419fbaee238.tar.xz
anaconda-5714c77ba120dcd6f19afa40e87d1419fbaee238.zip
2005-09-12 Jeremy Katz <katzj@redhat.com>
* iw/fdisk_gui.py: Remove dead code. * iw/fdasd_gui.py: Likewise. * textw/fdisk_text.py: Likewise. * textw/fdasd_text.py: Likewise.
Diffstat (limited to 'textw')
-rw-r--r--textw/fdasd_text.py119
-rw-r--r--textw/fdisk_text.py75
2 files changed, 0 insertions, 194 deletions
diff --git a/textw/fdasd_text.py b/textw/fdasd_text.py
deleted file mode 100644
index 1e55156d5..000000000
--- a/textw/fdasd_text.py
+++ /dev/null
@@ -1,119 +0,0 @@
-#
-# fdasd_text.py: allows the user to partition disks with fdasd utility
-# in text mode
-#
-# Harald Hoyer <harald@redhat.de>
-# Jeremy Katz <katzj@redhat.com>
-#
-# Copyright 2001-2002 Red Hat, Inc.
-#
-# This software may be freely redistributed under the terms of the GNU
-# library public license.
-#
-# You should have received a copy of the GNU Library Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-import os
-import isys
-import iutil
-from snack import *
-from rhpl.translate import _, cat, N_
-from constants_text import *
-import partitioning
-
-class fdasdPartitionWindow:
- def __call__(self, screen, diskset, partrequests, intf):
- choices = []
-
- fdisk_name = "fdasd"
- listboxtext = _("Choose a disk to run fdasd or dasdfmt on")
- buttons = [ (_("Next"), "done"), (_("Edit Partitions"), "edit"),
- (_("Format DASD"), "dasdfmt"),
- TEXT_BACK_BUTTON ]
- drives = diskset.driveList()
-
- drives.sort()
-
- for drive in drives:
- choices.append("%s" %(drive))
-
- # close all references we had to the diskset
- diskset.closeDevices()
-
- button = None
-
- while button != "done" and button != TEXT_BACK_CHECK:
-
- (button, choice) = \
- ListboxChoiceWindow(screen, _("Disk Setup"),
- listboxtext, choices,
- buttons, width = 50, help = "fdasd-s390")
-
- if button == "edit":
- device = choices[choice]
-
- if os.access("/sbin/fdasd", os.X_OK):
- path = "/sbin/fdasd"
- else:
- path = "/usr/sbin/fdasd"
-
- try:
- isys.makeDevInode(device, '/tmp/' + device)
- except:
- pass
-
- screen.suspend()
- rc = iutil.execWithRedirect (path, [ path, "/tmp/" + device ],
- ignoreTermSigs = 1)
- screen.resume()
-
- if rc:
- intf.messageWindow( _("Error"),
- _("An error occurred while running %s on drive %s.") % (path, device))
-
- try:
- os.remove('/tmp/' + device)
- except:
- pass
-
- elif button == "dasdfmt":
- device = choices[choice]
-
- rc = intf.messageWindow(_("Warning"),
- _("Running dasdfmt means the loss of \n"
- "ALL DATA on drive %s.\n\n"
- "Do you really want this?")
- % (device,), type = "yesno")
- if rc == 0:
- continue
-
- diskset.dasdFmt(intf, device)
-
- elif button == "done" or button == TEXT_BACK_CHECK:
- diskset.refreshDevices(intf)
- diskset.checkNoDisks(intf)
- partrequests.setFromDisk(diskset)
-
- if len(diskset.disks.keys()) == 0:
- rc = intf.messageWindow(_("No Drives Found"),
- _("An error has occurred - no valid devices were "
- "found on which to create new filesystems. "
- "Please check your hardware for the cause "
- "of this problem or use dasdfmt.\n\n"
- "Back to the fdasd screen?"), type = "yesno")
-
- if rc:
- button = ""
-
-
-
-
- if button == TEXT_BACK_CHECK:
- return INSTALL_BACK
-
- diskset.checkNoDisks(intf)
- partrequests.setFromDisk(diskset)
-
- return INSTALL_OK
diff --git a/textw/fdisk_text.py b/textw/fdisk_text.py
deleted file mode 100644
index df2565cd9..000000000
--- a/textw/fdisk_text.py
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# fdisk_text.py: allows the user to partition disks with fdisk utility
-# in text mode
-#
-# Jeremy Katz <katzj@redhat.com>
-#
-# Copyright 2001-2002 Red Hat, Inc.
-#
-# This software may be freely redistributed under the terms of the GNU
-# library public license.
-#
-# You should have received a copy of the GNU Library Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-import os
-import isys
-import iutil
-from snack import *
-from rhpl.translate import _, cat, N_
-from constants_text import *
-import partitioning
-
-class fdiskPartitionWindow:
- def __call__(self, screen, diskset, partrequests, intf):
- choices = []
- drives = diskset.disks.keys()
- drives.sort()
- for drive in drives:
- choices.append("%s" %(drive))
-
- # close all references we had to the diskset
- diskset.closeDevices()
-
- button = None
- while button != "done" and button != "back":
- (button, choice) = \
- ListboxChoiceWindow(screen, _("Disk Setup"),
- _("Choose a disk to run fdisk on"), choices,
- [ (_("OK"), "done"), (_("Edit"), "edit"),
- TEXT_BACK_BUTTON ], width = 50, help = "fdisk")
-
- if button != "done" and button != TEXT_BACK_CHECK:
- device = choices[choice]
-
- if os.access("/sbin/fdisk", os.X_OK):
- path = "/sbin/fdisk"
- else:
- path = "/usr/sbin/fdisk"
-
- try:
- isys.makeDevInode(device, '/tmp/' + device)
- except:
- pass
-
- screen.suspend()
- iutil.execWithRedirect (path, [ path, "/tmp/" + device ],
- ignoreTermSigs = 1)
- screen.resume()
-
- try:
- os.remove('/tmp/' + device)
- except:
- pass
-
-
- diskset.refreshDevices(intf)
- diskset.checkNoDisks(intf)
- partrequests.setFromDisk(diskset)
-
- if button == TEXT_BACK_CHECK:
- return INSTALL_BACK
-
- return INSTALL_OK