summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2011-04-12 15:41:59 -0400
committerChris Lumens <clumens@redhat.com>2011-04-13 13:40:13 -0400
commitceede6a03f0d6f34f123ba06396d61282112f512 (patch)
tree1e768f4c99d3096d69536ba4dfed163ebbb7cb03 /loader
parentf988a656cbc7b26a8f9ddca3bfaefa82d7a0aeb9 (diff)
downloadanaconda-ceede6a03f0d6f34f123ba06396d61282112f512.tar.gz
anaconda-ceede6a03f0d6f34f123ba06396d61282112f512.tar.xz
anaconda-ceede6a03f0d6f34f123ba06396d61282112f512.zip
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.
Diffstat (limited to 'loader')
-rw-r--r--loader/cdinstall.c30
-rw-r--r--loader/driverdisk.c54
-rw-r--r--loader/hdinstall.c38
-rw-r--r--loader/loader.c6
-rw-r--r--loader/method.c38
-rw-r--r--loader/nfsinstall.c44
-rw-r--r--loader/urlinstall.c16
7 files changed, 113 insertions, 113 deletions
diff --git a/loader/cdinstall.c b/loader/cdinstall.c
index e1e5fe78f..b0f8ffb0a 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");
- umount("/mnt/source");
+ umount("/mnt/install/source");
return 1;
}
diff --git a/loader/driverdisk.c b/loader/driverdisk.c
index 506ac32ac..f6af3314d 100644
--- a/loader/driverdisk.c
+++ b/loader/driverdisk.c
@@ -443,7 +443,7 @@ int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
break;
}
/* make sure nothing is mounted when we get here */
- num = umount("/tmp/dpart");
+ num = umount("/mnt/install/dpart");
if (num == -1) {
logMessage(ERROR, "error unmounting: %m");
if ((errno != EINVAL) && (errno != ENOENT))
@@ -451,7 +451,7 @@ int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
}
logMessage(INFO, "trying to mount %s as partition", part);
- if (doPwMount(part, "/tmp/dpart", "auto", "ro", NULL)) {
+ if (doPwMount(part, "/mnt/install/dpart", "auto", "ro", NULL)) {
newtWinMessage(_("Error"), _("OK"),
_("Failed to mount partition."));
stage = DEV_PART;
@@ -461,9 +461,9 @@ int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
ddfile = newt_select_file(_("Select driver disk image"),
_("Select the file which is your driver "
"disk image."),
- "/tmp/dpart", NULL);
+ "/mnt/install/dpart", NULL);
if (ddfile == NULL) {
- umount("/tmp/dpart");
+ umount("/mnt/install/dpart");
stage = DEV_PART;
dir = -1;
break;
@@ -480,13 +480,13 @@ int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
break;
}
if (dir == -1) {
- umount("/tmp/drivers");
- unlink("/tmp/drivers");
+ umount("/mnt/install/drivers");
+ unlink("/mnt/install/drivers");
ddfile = NULL;
stage = DEV_CHOOSEFILE;
break;
}
- if (doPwMount(ddfile, "/tmp/drivers", "auto", "ro", NULL)) {
+ if (doPwMount(ddfile, "/mnt/install/drivers", "auto", "ro", NULL)) {
newtWinMessage(_("Error"), _("OK"),
_("Failed to load driver disk from file."));
stage = DEV_CHOOSEFILE;
@@ -514,19 +514,19 @@ int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
dir = 1;
logMessage(INFO, "trying to mount %s", device);
- if (doPwMount(device, "/tmp/drivers", "auto", "ro", NULL)) {
+ if (doPwMount(device, "/mnt/install/drivers", "auto", "ro", NULL)) {
newtWinMessage(_("Error"), _("OK"),
_("Failed to mount driver disk."));
stage = DEV_INSERT;
break;
}
- rc = verifyDriverDisk("/tmp/drivers");
+ rc = verifyDriverDisk("/mnt/install/drivers");
if (rc == LOADER_BACK) {
newtWinMessage(_("Error"), _("OK"),
_("Driver disk is invalid for this "
"release of %s."), getProductName());
- umount("/tmp/drivers");
+ umount("/mnt/install/drivers");
stage = DEV_INSERT;
break;
}
@@ -544,8 +544,8 @@ int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
if (devices)
for(; devices[before]; before++);
- rc = loadDriverDisk(loaderData, "/tmp/drivers");
- umount("/tmp/drivers");
+ rc = loadDriverDisk(loaderData, "/mnt/install/drivers");
+ umount("/mnt/install/drivers");
if (rc == LOADER_BACK) {
dir = -1;
if (ddfile != NULL)
@@ -558,9 +558,9 @@ int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
stage = DEV_PROBE;
if (ddfile != NULL) {
- umount("/tmp/drivers");
- unlink("/tmp/drivers");
- umount("/tmp/dpart");
+ umount("/mnt/install/drivers");
+ unlink("/mnt/install/drivers");
+ umount("/mnt/install/dpart");
}
}
@@ -700,24 +700,24 @@ void getDDFromSource(struct loaderData_s * loaderData, char * src, GTree *module
return;
}
- if (!doPwMount(path, "/tmp/drivers", "auto", "ro", NULL)) {
- loadFromLocation(loaderData, "/tmp/drivers", moduleState);
- umount("/tmp/drivers");
- unlink("/tmp/drivers");
+ if (!doPwMount(path, "/mnt/install/drivers", "auto", "ro", NULL)) {
+ loadFromLocation(loaderData, "/mnt/install/drivers", moduleState);
+ umount("/mnt/install/drivers");
+ unlink("/mnt/install/drivers");
if (unlinkf) unlink(path);
}
}
void getDDFromDev(struct loaderData_s * loaderData, char * dev, GTree* moduleState) {
- if (doPwMount(dev, "/tmp/drivers", "auto", "ro", NULL)) {
+ if (doPwMount(dev, "/mnt/install/drivers", "auto", "ro", NULL)) {
logMessage(ERROR, "unable to mount driver disk %s", dev);
return;
}
- loadFromLocation(loaderData, "/tmp/drivers", moduleState);
- umount("/tmp/drivers");
- unlink("/tmp/drivers");
+ loadFromLocation(loaderData, "/mnt/install/drivers", moduleState);
+ umount("/mnt/install/drivers");
+ unlink("/mnt/install/drivers");
}
@@ -771,12 +771,12 @@ int loadDriverDiskFromPartition(struct loaderData_s *loaderData, char* device)
int rc;
logMessage(INFO, "trying to mount %s", device);
- if (doPwMount(device, "/tmp/drivers", "auto", "ro", NULL)) {
+ if (doPwMount(device, "/mnt/install/drivers", "auto", "ro", NULL)) {
logMessage(ERROR, "Failed to mount driver disk.");
return -1;
}
- rc = verifyDriverDisk("/tmp/drivers");
+ rc = verifyDriverDisk("/mnt/install/drivers");
if (rc == LOADER_BACK) {
logMessage(ERROR, "Driver disk is invalid for this "
"release of %s.", getProductName());
@@ -784,8 +784,8 @@ int loadDriverDiskFromPartition(struct loaderData_s *loaderData, char* device)
return -2;
}
- rc = loadDriverDisk(loaderData, "/tmp/drivers");
- umount("/tmp/drivers");
+ rc = loadDriverDisk(loaderData, "/mnt/install/drivers");
+ umount("/mnt/install/drivers");
if (rc == LOADER_BACK) {
return -3;
}
diff --git a/loader/hdinstall.c b/loader/hdinstall.c
index ce70fc8b8..b336690c2 100644
--- a/loader/hdinstall.c
+++ b/loader/hdinstall.c
@@ -106,13 +106,13 @@ int loadHdImages(struct loaderData_s *loaderData) {
parseDeviceAndDir(loaderData->instRepo, &device, &dir);
- if (doPwMount(device, "/mnt/isodir", "auto", "ro", NULL))
+ if (doPwMount(device, "/mnt/install/isodir", "auto", "ro", NULL))
return 0;
if (dir[0] == '/') {
- checked_asprintf(&path, "/mnt/isodir%s/updates.img", dir);
+ checked_asprintf(&path, "/mnt/install/isodir%s/updates.img", dir);
} else {
- checked_asprintf(&path, "/mnt/isodir/%s/updates.img", dir);
+ checked_asprintf(&path, "/mnt/install/isodir/%s/updates.img", dir);
}
logMessage(INFO, "Looking for updates for HD in %s", path);
@@ -120,9 +120,9 @@ int loadHdImages(struct loaderData_s *loaderData) {
free(path);
if (dir[0] == '/') {
- checked_asprintf(&path, "/mnt/isodir%s/product.img", dir);
+ checked_asprintf(&path, "/mnt/install/isodir%s/product.img", dir);
} else {
- checked_asprintf(&path, "/mnt/isodir/%s/product.img", dir);
+ checked_asprintf(&path, "/mnt/install/isodir/%s/product.img", dir);
}
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");
return 1;
}
@@ -266,22 +266,22 @@ int promptForHardDrive(struct loaderData_s *loaderData) {
logMessage(INFO, "partition %s selected", selpart);
/* 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 (dir[0] == '/') {
- checked_asprintf(&buf, "/mnt/isodir%s", dir);
+ checked_asprintf(&buf, "/mnt/install/isodir%s", dir);
} else {
- checked_asprintf(&buf, "/mnt/isodir/%s", dir);
+ checked_asprintf(&buf, "/mnt/install/isodir/%s", dir);
}
files = get_file_list(buf, ends_with_iso);
if (!files) {
newtWinMessage(_("Error"), _("OK"),
_("That directory does not contain an installable tree."));
- umount("/mnt/isodir");
+ umount("/mnt/install/isodir");
free(buf);
continue;
}
@@ -290,31 +290,31 @@ int promptForHardDrive(struct loaderData_s *loaderData) {
/* mount the first image and check for a .treeinfo file */
if (dir[0] == '/') {
- checked_asprintf(&buf, "/mnt/isodir%s/%s", dir, files[0]);
+ checked_asprintf(&buf, "/mnt/install/isodir%s/%s", dir, files[0]);
} else {
- checked_asprintf(&buf, "/mnt/isodir/%s/%s", dir, files[0]);
+ checked_asprintf(&buf, "/mnt/install/isodir/%s/%s", dir, files[0]);
}
- if (doPwMount(buf, "/tmp/testmnt", "auto", "ro", NULL)) {
+ if (doPwMount(buf, "/mnt/install/testmnt", "auto", "ro", NULL)) {
free(buf);
newtWinMessage(_("Error"), _("OK"),
_("That directory does not contain an installable tree."));
- umount("/mnt/isodir");
+ umount("/mnt/install/isodir");
continue;
}
free(buf);
- if (access("/tmp/testmnt/.treeinfo", R_OK)) {
+ if (access("/mnt/install/testmnt/.treeinfo", R_OK)) {
newtWinMessage(_("Error"), _("OK"),
_("That directory does not contain an installable tree."));
- umount("/tmp/testmnt");
- umount("/mnt/isodir");
+ umount("/mnt/install/testmnt");
+ umount("/mnt/install/isodir");
continue;
}
- umount("/tmp/testmnt");
- umount("/mnt/isodir");
+ umount("/mnt/install/testmnt");
+ umount("/mnt/install/isodir");
break;
}
diff --git a/loader/loader.c b/loader/loader.c
index 992e023c3..6b450d79d 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -478,7 +478,7 @@ void loadUpdates(struct loaderData_s *loaderData) {
case UPD_LOAD:
logMessage(INFO, "UPDATES device is %s", part);
- if (doPwMount(part, "/tmp/update-disk", "auto", "ro", NULL)) {
+ if (doPwMount(part, "/mnt/install/update-disk", "auto", "ro", NULL)) {
newtWinMessage(_("Error"), _("OK"),
_("Failed to mount updates disk"));
stage = UPD_PROMPT;
@@ -486,14 +486,14 @@ void loadUpdates(struct loaderData_s *loaderData) {
} else {
/* Copy everything to /tmp/updates so we can unmount the disk */
winStatus(40, 3, _("Updates"), _("Reading anaconda updates"));
- if (!copyDirectory("/tmp/update-disk", "/tmp/updates", copyWarnFn,
+ if (!copyDirectory("/mnt/install/update-disk", "/tmp/updates", copyWarnFn,
copyErrorFn)) {
dir = 1;
stage = UPD_DONE;
}
newtPopWindow();
- umount("/tmp/update-disk");
+ umount("/mnt/install/update-disk");
}
case UPD_DONE:
diff --git a/loader/method.c b/loader/method.c
index 35dbf69b3..2fb9de5b7 100644
--- a/loader/method.c
+++ b/loader/method.c
@@ -72,13 +72,13 @@ int readStampFileFromIso(char *file, char **timestamp, char **releasedescr) {
lstat(file, &sb);
if (S_ISBLK(sb.st_mode)) {
- if (doPwMount(file, "/tmp/testmnt", "iso9660", "ro", NULL)) {
+ if (doPwMount(file, "/mnt/install/testmnt", "iso9660", "ro", NULL)) {
logMessage(ERROR, "Failed to mount device %s to get description",
file);
return -1;
}
} else if (S_ISREG(sb.st_mode)) {
- if (doPwMount(file, "/tmp/testmnt", "auto", "ro", NULL)) {
+ if (doPwMount(file, "/mnt/install/testmnt", "auto", "ro", NULL)) {
logMessage(ERROR, "Failed to mount iso %s to get description",
file);
return -1;
@@ -89,8 +89,8 @@ int readStampFileFromIso(char *file, char **timestamp, char **releasedescr) {
return -1;
}
- if (!(dir = opendir("/tmp/testmnt"))) {
- umount("/tmp/testmnt");
+ if (!(dir = opendir("/mnt/install/testmnt"))) {
+ umount("/mnt/install/testmnt");
return -1;
}
@@ -107,7 +107,7 @@ int readStampFileFromIso(char *file, char **timestamp, char **releasedescr) {
descr = NULL;
tstamp = NULL;
if (stampfile) {
- snprintf(tmpstr, sizeof(tmpstr), "/tmp/testmnt/%s", stampfile);
+ snprintf(tmpstr, sizeof(tmpstr), "/mnt/install/testmnt/%s", stampfile);
f = fopen(tmpstr, "r");
if (f) {
char *tmpptr;
@@ -131,7 +131,7 @@ int readStampFileFromIso(char *file, char **timestamp, char **releasedescr) {
free(stampfile);
- umount("/tmp/testmnt");
+ umount("/mnt/install/testmnt");
if (descr != NULL && tstamp != NULL) {
descr[strlen(descr)-1] = '\0';
@@ -268,11 +268,11 @@ static void copyErrorFn (char *msg) {
void copyUpdatesImg(char * path) {
if (!access(path, R_OK)) {
- if (!doPwMount(path, "/tmp/update-disk", "auto", "ro", NULL)) {
- copyDirectory("/tmp/update-disk", "/tmp/updates", copyWarnFn,
+ if (!doPwMount(path, "/mnt/install/update-disk", "auto", "ro", NULL)) {
+ copyDirectory("/mnt/install/update-disk", "/tmp/updates", copyWarnFn,
copyErrorFn);
- umount("/tmp/update-disk");
- unlink("/tmp/update-disk");
+ umount("/mnt/install/update-disk");
+ unlink("/mnt/install/update-disk");
} else {
unpack_archive_file(path, "/tmp/updates");
}
@@ -281,11 +281,11 @@ void copyUpdatesImg(char * path) {
void copyProductImg(char * path) {
if (!access(path, R_OK)) {
- if (!doPwMount(path, "/tmp/product-disk", "auto", "ro", NULL)) {
- copyDirectory("/tmp/product-disk", "/tmp/product", copyWarnFn,
+ if (!doPwMount(path, "/mnt/install/product-disk", "auto", "ro", NULL)) {
+ copyDirectory("/mnt/install/product-disk", "/tmp/product", copyWarnFn,
copyErrorFn);
- umount("/tmp/product-disk");
- unlink("/tmp/product-disk");
+ umount("/mnt/install/product-disk");
+ unlink("/mnt/install/product-disk");
}
}
}
@@ -304,11 +304,11 @@ int getFileFromBlockDevice(char *device, char *path, char * dest) {
/* some USB thumb drives and hard drives are slow to initialize */
/* retry up to 5 times or 31 seconds */
- rc = doPwMount(device, "/tmp/mnt", "auto", "ro", NULL);
+ rc = doPwMount(device, "/mnt/install/testmnt", "auto", "ro", NULL);
for (i = 0; mountMightSucceedLater(rc) && i < 5; ++i) {
logMessage(INFO, "sleeping to wait for USB storage devices");
sleep(1 << i);
- rc = doPwMount(device, "/tmp/mnt", "auto", "ro", NULL);
+ rc = doPwMount(device, "/mnt/install/testmnt", "auto", "ro", NULL);
logMessage(ERROR, "error code: %d", rc);
}
if (rc) {
@@ -316,7 +316,7 @@ int getFileFromBlockDevice(char *device, char *path, char * dest) {
return 2;
}
- snprintf(file, sizeof(file), "/tmp/mnt/%s", path);
+ snprintf(file, sizeof(file), "/mnt/install/testmnt/%s", path);
logMessage(INFO, "Searching for file on path %s", file);
if (access(file, R_OK)) {
@@ -327,7 +327,7 @@ int getFileFromBlockDevice(char *device, char *path, char * dest) {
logMessage(INFO, "file copied to %s", dest);
}
- umount("/tmp/mnt");
- unlink("/tmp/mnt");
+ umount("/mnt/install/testmnt");
+ unlink("/mnt/install/testmnt");
return rc;
}
diff --git a/loader/nfsinstall.c b/loader/nfsinstall.c
index a9584ab44..ffaa51bec 100644
--- a/loader/nfsinstall.c
+++ b/loader/nfsinstall.c
@@ -184,25 +184,25 @@ static unsigned int isNfsIso(struct loaderData_s *loaderData) {
parseNfsHostPathOpts(loaderData->instRepo, &host, &path, &opts);
checked_asprintf(&url, "%s:%s", host, path);
- 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) {
}
cleanup4:
- umount("/tmp/testmnt");
+ umount("/mnt/install/testmnt");
cleanup3:
free(buf);
cleanup2:
- umount("/mnt/isodir");
+ umount("/mnt/install/isodir");
cleanup1:
g_free(host);
g_free(path);
@@ -280,11 +280,11 @@ int loadNfsImages(struct loaderData_s *loaderData) {
checked_asprintf(&url, "%s:%s/RHupdates", host, path);
logMessage(INFO, "Looking for updates in %s", url);
- if (!doPwMount(url, "/tmp/update-disk", "nfs", opts, NULL)) {
+ if (!doPwMount(url, "/mnt/install/update-disk", "nfs", opts, NULL)) {
logMessage(INFO, "Using RHupdates/ for NFS install");
- copyDirectory("/tmp/update-disk", "/tmp/updates", NULL, NULL);
- umount("/tmp/update-disk");
- unlink("/tmp/update-disk");
+ copyDirectory("/mnt/install/update-disk", "/tmp/updates", NULL, NULL);
+ umount("/mnt/install/update-disk");
+ unlink("/mnt/install/update-disk");
} else {
logMessage(INFO, "No RHupdates/ directory found, skipping");
}
@@ -292,17 +292,17 @@ int loadNfsImages(struct loaderData_s *loaderData) {
free(url);
checked_asprintf(&url, "%s:%s", host, path);
- if (!doPwMount(url, "/tmp/disk-image", "nfs", opts, NULL)) {
+ if (!doPwMount(url, "/mnt/install/disk-image", "nfs", opts, NULL)) {
free(url);
logMessage(INFO, "Looking for updates in %s/updates.img", loaderData->instRepo);
- copyUpdatesImg("/tmp/disk-image/updates.img");
+ copyUpdatesImg("/mnt/install/disk-image/updates.img");
logMessage(INFO, "Looking for product in %s/product.img", loaderData->instRepo);
- copyProductImg("/tmp/disk-image/product.img");
+ copyProductImg("/mnt/install/disk-image/product.img");
- umount("/tmp/disk-image");
- unlink("/tmp/disk-image");
+ umount("/mnt/install/disk-image");
+ unlink("/mnt/install/disk-image");
} else {
logMessage(INFO, "Couldn't mount %s for updates and product", loaderData->instRepo);
free(url);
@@ -435,10 +435,10 @@ int getFileFromNfs(char * url, char * dest, struct loaderData_s * loaderData) {
logMessage(INFO, "file location: nfs:%s/%s", host, file);
- if (!doPwMount(host, "/tmp/mnt", "nfs", opts, NULL)) {
+ if (!doPwMount(host, "/mnt/install/testmnt", "nfs", opts, NULL)) {
char * buf;
- checked_asprintf(&buf, "/tmp/mnt/%s", file);
+ checked_asprintf(&buf, "/mnt/install/testmnt/%s", file);
if (copyFile(buf, dest)) {
logMessage(ERROR, "failed to copy file to %s", dest);
@@ -456,10 +456,10 @@ int getFileFromNfs(char * url, char * dest, struct loaderData_s * loaderData) {
g_free(opts);
if (ip) free(ip);
- if (umount("/tmp/mnt") == -1)
- logMessage(ERROR, "could not unmount /tmp/mnt in getFileFromNfs: %s", strerror(errno));
+ if (umount("/mnt/install/testmnt") == -1)
+ logMessage(ERROR, "could not unmount /mnt/install/testmnt in getFileFromNfs: %s", strerror(errno));
else
- unlink("/tmp/mnt");
+ unlink("/mnt/install/testmnt");
return failed;
}
diff --git a/loader/urlinstall.c b/loader/urlinstall.c
index 23fe7b3ba..f3713d02b 100644
--- a/loader/urlinstall.c
+++ b/loader/urlinstall.c
@@ -171,12 +171,12 @@ int loadUrlImages(struct loaderData_s *loaderData) {
checked_asprintf(&url, "%s/images/%s", loaderData->instRepo, "updates.img");
- if (!loadSingleUrlImage(loaderData, url, "/tmp/updates-disk.img", "/tmp/update-disk", 1)) {
- copyDirectory("/tmp/update-disk", "/tmp/updates", copyWarnFn,
+ if (!loadSingleUrlImage(loaderData, url, "/tmp/updates-disk.img", "/mnt/install/update-disk", 1)) {
+ copyDirectory("/mnt/install/update-disk", "/tmp/updates", copyWarnFn,
copyErrorFn);
- umount("/tmp/update-disk");
+ umount("/mnt/install/update-disk");
unlink("/tmp/updates-disk.img");
- unlink("/tmp/update-disk");
+ unlink("/mnt/install/update-disk");
} else if (!access("/tmp/updates-disk.img", R_OK)) {
unpack_archive_file("/tmp/updates-disk.img", "/tmp/updates");
unlink("/tmp/updates-disk.img");
@@ -186,12 +186,12 @@ int loadUrlImages(struct loaderData_s *loaderData) {
checked_asprintf(&url, "%s/images/%s", loaderData->instRepo, "product.img");
- if (!loadSingleUrlImage(loaderData, url, "/tmp/product-disk.img", "/tmp/product-disk", 1)) {
- copyDirectory("/tmp/product-disk", "/tmp/product", copyWarnFn,
+ if (!loadSingleUrlImage(loaderData, url, "/tmp/product-disk.img", "/mnt/install/product-disk", 1)) {
+ copyDirectory("/mnt/install/product-disk", "/tmp/product", copyWarnFn,
copyErrorFn);
- umount("/tmp/product-disk");
+ umount("/mnt/install/product-disk");
unlink("/tmp/product-disk.img");
- unlink("/tmp/product-disk");
+ unlink("/mnt/install/product-disk");
}
free(url);