summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-09-20 19:51:58 +0000
committerMatt Wilson <msw@redhat.com>1999-09-20 19:51:58 +0000
commit35e068eb6c328334daded553e2458a55962439f7 (patch)
treebe637b1731b4bc0d35fa881f504f6f8f70f28a8d
parent67b33653ff35aac8369764acf6509fea01f1cc35 (diff)
downloadanaconda-35e068eb6c328334daded553e2458a55962439f7.tar.gz
anaconda-35e068eb6c328334daded553e2458a55962439f7.tar.xz
anaconda-35e068eb6c328334daded553e2458a55962439f7.zip
fixed
-rw-r--r--iw/fdisk.py24
1 files changed, 17 insertions, 7 deletions
diff --git a/iw/fdisk.py b/iw/fdisk.py
index b60abc6bb..98f9285ae 100644
--- a/iw/fdisk.py
+++ b/iw/fdisk.py
@@ -1,9 +1,9 @@
from gtk import *
from iw import *
from gnome.zvt import *
-from os import execvp
from gui import _
import isys
+import os
class FDiskWindow (InstallWindow):
@@ -15,7 +15,11 @@ class FDiskWindow (InstallWindow):
self.windowContainer.remove (self.windowContainer.children ()[0])
self.windowContainer.pack_start (self.buttonBox)
button.set_state (STATE_NORMAL)
-
+ try:
+ os.remove ('/tmp/' + self.drive)
+ except:
+ # XXX fixme
+ pass
self.ics.setPrevEnabled (1)
self.ics.setNextEnabled (1)
self.ics.setHelpEnabled (1)
@@ -23,12 +27,18 @@ class FDiskWindow (InstallWindow):
def button_clicked (self, widget, drive):
zvt = ZvtTerm (80, 24)
zvt.connect ("child_died", self.child_died, widget)
+ self.drive = drive
+ if os.access("/sbin/fdisk", os.X_OK):
+ path = "/sbin/fdisk"
+ else:
+ path = "/usr/sbin/fdisk"
+ try:
+ isys.makeDevInode(drive, '/tmp/' + drive)
+ except:
+ # XXX FIXME
+ pass
if zvt.forkpty() == 0:
- if not os.access ("/usr/sbin/fdisk", os.X_OK):
- path = "/usr/sbin/fdisk"
- else:
- path = "/sbin/fdisk"
- execvp (path, ("fdisk", "/dev/%s" % (drive,)))
+ os.execvp (path, (path, '/tmp/' + drive))
zvt.show ()
self.windowContainer.remove (self.buttonBox)