Move most anaconda mount points to be under /mnt/install.
/mnt/sysimage stays where it is because that's fairly widely established and
known outside anaconda, whereas all these other mount points are private
anaconda knowledge. /mnt/source is somewhat widely used, but I have cautioned
people about getting used to that.
---
loader/cdinstall.c | 30 +++++++++---------
loader/driverdisk.c | 54 +++++++++++++++++-----------------
loader/hdinstall.c | 38 ++++++++++++------------
loader/loader.c | 6 ++--
loader/method.c | 38 ++++++++++++------------
loader/nfsinstall.c | 44 ++++++++++++++--------------
loader/urlinstall.c | 16 +++++-----
pyanaconda/image.py | 24 ++++++++--------
pyanaconda/storage/__init__.py | 4 +-
pyanaconda/yuminstall.py | 10 +++---
tests/pyanaconda_test/image_test.py | 18 ++++++------
11 files changed, 141 insertions(+), 141 deletions(-)
diff --git a/loader/cdinstall.c b/loader/cdinstall.c
index e1e5fe7..b0f8ffb 100644
--- a/loader/cdinstall.c
+++ b/loader/cdinstall.c
@@ -217,18 +217,18 @@ void queryCDMediaCheck(char *instRepo) {
* media. Now we need to unmount it to perform the check, then
* remount to pretend nothing ever happened.
*/
- umount("/mnt/source");
+ umount("/mnt/install/source");
mediaCheckCdrom(device);
do {
- if (doPwMount(device, "/mnt/source", "iso9660", "ro", NULL)) {
+ if (doPwMount(device, "/mnt/install/source", "iso9660", "ro", NULL)) {
ejectCdrom(device);
wrongCDMessage();
continue;
}
- if (access("/mnt/source/.discinfo", R_OK)) {
- umount("/mnt/source");
+ if (access("/mnt/install/source/.discinfo", R_OK)) {
+ umount("/mnt/install/source");
ejectCdrom(device);
wrongCDMessage();
continue;
@@ -266,7 +266,7 @@ int findInstallCD(struct loaderData_s *loaderData) {
devices[i]->device = tmp;
}
- logMessage(INFO, "trying to mount CD device %s on /mnt/source",
+ logMessage(INFO, "trying to mount CD device %s on /mnt/install/source",
devices[i]->device);
if (!FL_CMDLINE(flags))
@@ -302,16 +302,16 @@ int findInstallCD(struct loaderData_s *loaderData) {
if (!FL_CMDLINE(flags))
newtPopWindow();
- if ((rc = doPwMount(devices[i]->device, "/mnt/source", "iso9660", "ro", NULL)) == 0) {
- if (!access("/mnt/source/.treeinfo", R_OK) && !access("/mnt/source/.discinfo", R_OK)) {
+ if ((rc = doPwMount(devices[i]->device, "/mnt/install/source", "iso9660", "ro", NULL)) == 0) {
+ if (!access("/mnt/install/source/.treeinfo", R_OK) && !access("/mnt/install/source/.discinfo", R_OK)) {
loaderData->method = METHOD_CDROM;
- checked_asprintf(&loaderData->instRepo, "cdrom://%s:/mnt/source", devices[i]->device);
+ checked_asprintf(&loaderData->instRepo, "cdrom://%s:/mnt/install/source", devices[i]->device);
return LOADER_OK;
} else {
/* This wasn't the CD we were looking for. Clean up and
* try the next drive.
*/
- umount("/mnt/source");
+ umount("/mnt/install/source");
}
}
}
@@ -360,16 +360,16 @@ int loadCdromImages(struct loaderData_s *loaderData) {
tmp = loaderData->instRepo+8;
checked_asprintf(&device, "%.*s", (int) (strchr(tmp, ':')-tmp), tmp);
- if (doPwMount(device, "/mnt/source", "auto", "ro", NULL))
+ if (doPwMount(device, "/mnt/install/source", "auto", "ro", NULL))
return 0;
- logMessage(INFO, "Looking for updates in /mnt/source/images/updates.img");
- copyUpdatesImg("/mnt/source/images/updates.img");
+ logMessage(INFO, "Looking for updates in /mnt/install/source/images/updates.img");
+ copyUpdatesImg("/mnt/install/source/images/updates.img");
- logMessage(INFO, "Looking for product in /mnt/source/images/product.img");
- copyProductImg("/mnt/source/images/product.img");
+ logMessage(INFO, "Looking for product in /mnt/install/source/images/product.img");
+ copyProductImg("/mnt/install/source/images/product.img");
logMessage(INFO, "Looking for product for HD in %s", path);
@@ -131,7 +131,7 @@ int loadHdImages(struct loaderData_s *loaderData) {
free(device);
free(dir);
free(path);
- umount("/mnt/isodir");
+ umount("/mnt/install/isodir");
/* Now verify the ISO images pointed to contain an installation source. */
- if (doPwMount(selpart, "/mnt/isodir", "auto", "ro", NULL)) {
+ if (doPwMount(selpart, "/mnt/install/isodir", "auto", "ro", NULL)) {
logMessage(ERROR, "couldn't mount %s to verify images", selpart);
continue;
}
- if (doPwMount(url, "/mnt/isodir", "nfs", opts, NULL)) {
+ if (doPwMount(url, "/mnt/install/isodir", "nfs", opts, NULL)) {
logMessage(ERROR, "couldn't mount %s to look for NFSISO", url);
goto cleanup1;
}
- files = get_file_list("/mnt/isodir", ends_with_iso);
+ files = get_file_list("/mnt/install/isodir", ends_with_iso);
if (!files) {
- logMessage(ERROR, "no ISO images present in /mnt/isodir");
+ logMessage(ERROR, "no ISO images present in /mnt/install/isodir");
goto cleanup2;
}
/* mount the first image and check for a .treeinfo file */
- checked_asprintf(&buf, "/mnt/isodir/%s", files[0]);
- if (doPwMount(buf, "/tmp/testmnt", "auto", "ro", NULL)) {
+ checked_asprintf(&buf, "/mnt/install/isodir/%s", files[0]);
+ if (doPwMount(buf, "/mnt/install/testmnt", "auto", "ro", NULL)) {
logMessage(ERROR, "ISO image %s does not contain a .treeinfo file", files[0]);
goto cleanup3;
}
- if (access("/tmp/testmnt/.treeinfo", R_OK)) {
+ if (access("/mnt/install/testmnt/.treeinfo", R_OK)) {
logMessage(ERROR, ".treeinfo file is not accessible");
goto cleanup4;
}
@@ -217,11 +217,11 @@ static unsigned int isNfsIso(struct loaderData_s *loaderData) {
}
- if not os.access("/mnt/cdimage/.discinfo", os.R_OK):
- isys.umount("/mnt/cdimage", removeDir=False)
+ if not os.access("/mnt/install/cdimage/.discinfo", os.R_OK):
+ isys.umount("/mnt/install/cdimage", removeDir=False)
continue
# If there's no repodata, there's no point in trying to
# install from it.
- if not os.access("/mnt/cdimage/repodata", os.R_OK):
+ if not os.access("/mnt/install/cdimage/repodata", os.R_OK):
log.warning("%s doesn't have repodata, skipping" %(what,))
- isys.umount("/mnt/cdimage", removeDir=False)
+ isys.umount("/mnt/install/cdimage", removeDir=False)
continue
# warn user if images appears to be wrong size
@@ -86,7 +86,7 @@ def findFirstIsoImage(path, messageWindow):
sys.exit(0)
log.info("Found disc at %s" % f)
- isys.umount("/mnt/cdimage", removeDir=False)
+ isys.umount("/mnt/install/cdimage", removeDir=False)
return f
# This mounts the directory containing the iso images, and places the
-# mount point in /mnt/isodir.
+# mount point in /mnt/install/isodir.
def mountDirectory(methodstr, messageWindow):
if methodstr.startswith("hd:"):
method = methodstr[3:]
@@ -124,12 +124,12 @@ def mountDirectory(methodstr, messageWindow):
return
# No need to mount it again.
- if os.path.ismount("/mnt/isodir"):
+ if os.path.ismount("/mnt/install/isodir"):
return
while True:
try:
- isys.mount(device, "/mnt/isodir", fstype=fstype, options=options)
+ isys.mount(device, "/mnt/install/isodir", fstype=fstype, options=options)
break
except SystemError as msg:
log.error("couldn't mount ISO source directory: %s" % msg)
diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 889c3a1..b0411a9 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -1470,8 +1470,8 @@ def mountExistingSystem(anaconda, rootEnt,
else:
readOnly = ""
- if rootDevice.protected and os.path.ismount("/mnt/isodir"):
- isys.mount("/mnt/isodir",
+ if rootDevice.protected and os.path.ismount("/mnt/install/isodir"):
+ isys.mount("/mnt/install/isodir",
rootPath,
fstype=rootDevice.format.type,
bindMount=True)
diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py
index fc3c3dc..1dac081 100644
--- a/pyanaconda/yuminstall.py
+++ b/pyanaconda/yuminstall.py
@@ -316,7 +316,7 @@ class AnacondaYum(yum.YumBase):
# Where is the source media mounted? This is the directory
# where Packages/ is located.
- self.tree = "/mnt/source"
+ self.tree = "/mnt/install/source"
if hasattr(self, "use_txmbr_in_callback"):
log.debug("enabling new callback mode")
@@ -445,15 +445,15 @@ class AnacondaYum(yum.YumBase):
else:
(device, fstype, path) = m[3:].split(":")