summaryrefslogtreecommitdiffstats
path: root/yuminstall.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-02-28 17:14:36 -0500
committerChris Lumens <clumens@redhat.com>2008-03-04 13:03:14 -0500
commit30d4305d19a8cee86c0b4cc5c1cdf0e3dde51542 (patch)
tree057e498d288a7f0342174514ff4b564f2f6d1d22 /yuminstall.py
parentfd64a8e650e0f3e94dfe6cc0d2d947944c852402 (diff)
downloadanaconda-30d4305d19a8cee86c0b4cc5c1cdf0e3dde51542.tar.gz
anaconda-30d4305d19a8cee86c0b4cc5c1cdf0e3dde51542.tar.xz
anaconda-30d4305d19a8cee86c0b4cc5c1cdf0e3dde51542.zip
Support stage2= for HD installs.
Diffstat (limited to 'yuminstall.py')
-rw-r--r--yuminstall.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/yuminstall.py b/yuminstall.py
index 7de9b0963..8d6886dab 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -280,7 +280,7 @@ class AnacondaYum(YumSorter):
# directory where Packages/ is located.
self.tree = "/mnt/source"
- if os.path.ismount("/mnt/isodir"):
+ if self.anaconda.methodstr.startswith("hd:"):
self.isodir = "/mnt/isodir"
else:
self.isodir = None
@@ -315,6 +315,10 @@ class AnacondaYum(YumSorter):
self.localPackages = []
def systemMounted(self, fsset, chroot):
+ if os.path.exists("/tmp/stage2.img"):
+ log.debug("Not copying stage2.img as we already have it")
+ return
+
if not os.path.exists("%s/images/stage2.img" %(self.tree,)):
log.debug("Not copying stage2.img as we can't find it")
return
@@ -446,9 +450,13 @@ class AnacondaYum(YumSorter):
self.conf.metadata_expire = 0
if self.anaconda.methodstr.startswith("nfs:"):
- methodstr = "file:///mnt/source"
- if not os.path.ismount("/mnt/source"):
- isys.mount(self.anaconda.methodstr[4:], "/mnt/source", "nfs")
+ methodstr = "file://%s" % self.tree
+ if not os.path.ismount(self.tree):
+ isys.mount(self.anaconda.methodstr[4:], self.tree, "nfs")
+ elif self.anaconda.methodstr.startswith("cdrom:"):
+ methodstr = "file://%s" % self.tree
+ elif self.anaconda.methodstr.startswith("hd:"):
+ methodstr = "file://%s" % self.tree
elif self.anaconda.methodstr.startswith("ftp:") or self.anaconda.methodstr.startswith("http:"):
methodstr = self.anaconda.methodstr