summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-11-07 15:27:10 +0000
committerErik Troan <ewt@redhat.com>2000-11-07 15:27:10 +0000
commitfbe3af5c6a77d491af22cc495040d4486e069a81 (patch)
tree216b2f8df967519b3fa88dc9472c8ec5172a3cb6
parent773099de2933b03e8450c564f3e4450b83bbdd58 (diff)
downloadanaconda-fbe3af5c6a77d491af22cc495040d4486e069a81.tar.gz
anaconda-fbe3af5c6a77d491af22cc495040d4486e069a81.tar.xz
anaconda-fbe3af5c6a77d491af22cc495040d4486e069a81.zip
support multiple cdrom drives
-rw-r--r--image.py24
1 files changed, 22 insertions, 2 deletions
diff --git a/image.py b/image.py
index 370566627..b6bf55fb3 100644
--- a/image.py
+++ b/image.py
@@ -6,6 +6,7 @@ import iutil
import os
import isys
import time
+import kudzu
import string
from translate import _
from log import log
@@ -69,11 +70,30 @@ class CdromInstallMethod(ImageInstallMethod):
elif h[1000002] != self.currentDisc:
self.currentDisc = h[1000002]
isys.umount("/mnt/source")
- isys.ejectCdrom(self.device)
+ done = 0
key = ".disc%d-%s" % (self.currentDisc, iutil.getArch())
- done = 0
+ cdlist = []
+ for (dev, something, descript) in \
+ kudzu.probe(kudzu.CLASS_CDROM, kudzu.BUS_UNSPEC, 0):
+ if dev != self.device:
+ cdlist.append(dev)
+
+ for dev in cdlist:
+ try:
+ if not isys.mount(dev, "/mnt/source", fstype = "iso9660",
+ readOnly = 1):
+ if os.access("/mnt/source/%s" % key, os.O_RDONLY):
+ done = 1
+ else:
+ isys.umount("/mnt/source")
+ except:
+ pass
+
+ if not done:
+ isys.ejectCdrom(self.device)
+
while not done:
self.messageWindow(_("Change CDROM"),
_("Please insert disc %d to continue.") % self.currentDisc)