-# This mounts the directory containing the iso images, and places the
-# mount point in /mnt/isodir.
-def mountDirectory(methodstr, messageWindow):
- if methodstr.startswith("hd:"):
- method = methodstr[3:]
- if method.count(":") == 1:
- (device, path) = method.split(":")
- fstype = "auto"
- else:
- (device, fstype, path) = method.split(":")
-
- if not device.startswith("/dev/") and not device.startswith("UUID=")
- and not device.startswith("LABEL="):
- device = "/dev/%s" % device
- elif methodstr.startswith("nfsiso:"):
- device = methodstr[7:]
- fstype = "nfs"
- else:
- return
-
- # No need to mount it again.
- if os.path.ismount("/mnt/isodir"):
- return
-
- while True:
- try:
- isys.mount(device, "/mnt/isodir", fstype = fstype)
- break
- except SystemError, msg:
- log.error("couldn't mount ISO source directory: %s" % msg)
- ans = messageWindow(_("Couldn't Mount ISO Source"),
- _("An error occurred mounting the source "
- "device %s. This may happen if your ISO "
- "images are located on an advanced storage "
- "device like LVM or RAID, or if there was a "
- "problem mounting a partition. Click exit "
- "to abort the installation.")
- % (device,), type="custom", custom_icon="error",
- custom_buttons=[_("_Exit"), _("_Retry")])
-
- if ans == 0:
- sys.exit(0)
- else:
- continue
-
def mountImage(isodir, tree, discnum, messageWindow, discImages={}):
if os.path.ismount(tree):
raise SystemError, "trying to mount already-mounted iso image!"
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index 9a1c142..3aacd12 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -1074,6 +1074,19 @@ def parseNfsUrl(nfsurl):
host = s[0]
return (options, host, path)
+def parseHdUrl(url):
+ device = '
+ fstype = '
+ path = '
+ if url:
+ s = url.split(":")
+ s.pop(0)
+ if len(s) >= 3:
+ (device, fstype, path) = s[:3]
+ elif len(2) == 2:
+ (device, path) = s
+ return (device, fstype, path)
+
def add_po_path(module, dir):
""" Looks to see what translations are under a given path and tells
the gettext module to use that path as the base dir """
diff --git a/pyanaconda/iw/task_gui.py b/pyanaconda/iw/task_gui.py
index 3a6392e..5da1bd1 100644
--- a/pyanaconda/iw/task_gui.py
+++ b/pyanaconda/iw/task_gui.py
@@ -104,6 +104,7 @@ class RepoEditor:
store.append(["HTTP/FTP", "http", self._applyURL, 0])
store.append(["NFS", "nfs", self._applyNfs, 2])
if repotype == "method":
+ store.append(["NFS ISO", "nfsiso", self._applyNfsIso, 2])
store.append(["CD/DVD", "cdrom", self._applyMedia, 1])
#store.append(["HD", "hd", self._applyHd, 3])
@@ -111,7 +112,8 @@ class RepoEditor:
d = {"http":"http",
"ftp":"http",
"cdrom":"cdrom",
- "nfs":"nfs",
+ "nfsiso":"nfsiso",
+ "nfs:":"nfs",
"hd":"hd"}
for prefix in d:
if url.startswith(prefix):
@@ -245,6 +247,12 @@ class RepoEditor:
self.repo.url = "nfs:%s:%s:%s" % (options,server,path)
return True