diff options
author | Chris Lumens <clumens@redhat.com> | 2012-08-17 16:03:49 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2012-08-20 11:13:07 -0400 |
commit | 51b900fff2220a5288303369828f1bd3a3532c6b (patch) | |
tree | 87a14f13584515c593ce3540278a98f14bc14ee9 /pyanaconda | |
parent | f173bb3171231c259e599d447a7ad6495ce38769 (diff) | |
download | anaconda-51b900fff2220a5288303369828f1bd3a3532c6b.tar.gz anaconda-51b900fff2220a5288303369828f1bd3a3532c6b.tar.xz anaconda-51b900fff2220a5288303369828f1bd3a3532c6b.zip |
If dracut left the DVD mounted, don't try to remount it (#849152).
Trying to remount was causing an exception which meant the DVD got thrown
out as a possible installation source, so we were trying to use the network.
Diffstat (limited to 'pyanaconda')
-rw-r--r-- | pyanaconda/packaging/yumpayload.py | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index 4c391e5a0..89c1ddb31 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -550,16 +550,24 @@ reposdir=%s url = method.url sslverify = not (method.noverifyssl or flags.noverifyssl) elif method.method == "cdrom" or not method.method: - # cdrom or no method specified -- check for media - device = opticalInstallMedia(storage.devicetree) + # Did dracut leave the DVD mounted for us? + device = get_mount_device("/run/install/repo") if device: - self._setUpMedia(device) - self.install_device = device - url = "file://" + INSTALL_TREE + self.install_device = storage.devicetree.getDeviceByPath(device) + url = "file:///run/install/repo" if not method.method: method.method = "cdrom" - elif method.method == "cdrom": - raise PayloadSetupError("no usable optical media found") + else: + # cdrom or no method specified -- check for media + device = opticalInstallMedia(storage.devicetree) + if device: + self._setUpMedia(device) + self.install_device = device + url = "file://" + INSTALL_TREE + if not method.method: + method.method = "cdrom" + elif method.method == "cdrom": + raise PayloadSetupError("no usable optical media found") if method.method: self._yum.preconf.releasever = self._getReleaseVersion(url) |