summaryrefslogtreecommitdiffstats
path: root/todo.py
diff options
context:
space:
mode:
authorpbrown <pbrown>2000-01-10 20:55:17 +0000
committerpbrown <pbrown>2000-01-10 20:55:17 +0000
commit66b6924825afa03ee6d41602548196cdf5498cc7 (patch)
tree8b7d98dd068c85c0cef4a76335928b86c1fc70fb /todo.py
parent5c067a476f22d23406b799e9261c26332220f2c0 (diff)
downloadanaconda-66b6924825afa03ee6d41602548196cdf5498cc7.tar.gz
anaconda-66b6924825afa03ee6d41602548196cdf5498cc7.tar.xz
anaconda-66b6924825afa03ee6d41602548196cdf5498cc7.zip
added support for removable storage (zip/jaz). Not tested yet, but won't
hurt anything if it is broken.
Diffstat (limited to 'todo.py')
-rw-r--r--todo.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/todo.py b/todo.py
index 5857ce568..ad0a012f7 100644
--- a/todo.py
+++ b/todo.py
@@ -1041,6 +1041,30 @@ class ToDo:
mntpoint = "/mnt/" + cdname
self.fstab.addMount(cdname, mntpoint, "iso9660")
+ def createRemovable(self, rType):
+ self.log ("making %s drive links (if any)", % rType)
+ list = isys.floppyDriveList()
+ list = list + isys.hardDriveList()
+ count = 0
+ for device in list:
+ (device, descript) = device
+ if string.find(string.upper(descript),
+ string.upper(rType)) != -1 or
+ self.log ("found %s disk, creating link", rType)
+ try:
+ os.stat(self.instPath + "/dev/%s" % rType)
+ self.log ("link exists, removing")
+ os.unlink(self.instPath + "/dev/%s" % rType)
+ except OSError:
+ pass
+ # the 4th partition of zip/jaz disks is the one that usually
+ # contains the DOS filesystem. We'll guess at using that
+ # one, it is a sane default.
+ device = device + "4";
+ os.symlink(device, self.instPath + "/dev/%s" % rType)
+ mntpoint = "/mnt/%s" % rType
+ self.fstab.addMount(rType, mntpoint, "auto")
+
def setDefaultRunlevel (self):
inittab = open (self.instPath + '/etc/inittab', 'r')
lines = inittab.readlines ()
@@ -1299,6 +1323,8 @@ class ToDo:
if not self.upgrade:
self.createCdrom()
+ self.createRemovable("zip")
+ self.createRemovable("jaz")
self.copyExtraModules()
self.setFdDevice()
self.fstab.write (self.instPath, fdDevice = self.fdDevice)