summaryrefslogtreecommitdiffstats
path: root/loader2
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-02-04 14:46:43 -0500
committerChris Lumens <clumens@redhat.com>2008-02-04 16:45:04 -0500
commita29524da3cede636c324aac8895c556a02850d8f (patch)
treec352aeb8576ff543c36b8ab8ecc3550d813b5396 /loader2
parent7d84cc3e96d50eac2d2bf5581c23fb4430ae9a66 (diff)
downloadanaconda-a29524da3cede636c324aac8895c556a02850d8f.tar.gz
anaconda-a29524da3cede636c324aac8895c556a02850d8f.tar.xz
anaconda-a29524da3cede636c324aac8895c556a02850d8f.zip
Use /mnt/source and /mnt/isodir just like nfsiso installs.
Diffstat (limited to 'loader2')
-rw-r--r--loader2/hdinstall.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/loader2/hdinstall.c b/loader2/hdinstall.c
index 23f950aae..4e69c19f1 100644
--- a/loader2/hdinstall.c
+++ b/loader2/hdinstall.c
@@ -155,8 +155,7 @@ static char * setupIsoImages(char * device, char * dirName, char * location) {
/* XXX try to mount as ext2 and then vfat */
for (type=typetry; *type; type++) {
- if (!doPwMount(device, "/tmp/hdimage", *type,
- IMOUNT_RDONLY, NULL))
+ if (!doPwMount(device, "/mnt/isodir", *type, IMOUNT_RDONLY, NULL))
break;
}
@@ -164,9 +163,9 @@ static char * setupIsoImages(char * device, char * dirName, char * location) {
return NULL;
if (*dirName == '/')
- sprintf(filespec, "/tmp/hdimage%s", dirName);
+ sprintf(filespec, "/mnt/isodir%s", dirName);
else
- sprintf(filespec, "/tmp/hdimage/%s", dirName);
+ sprintf(filespec, "/mnt/isodir/%s", dirName);
if ((path = validIsoImages(filespec, 0))) {
char updpath[4096];
@@ -177,33 +176,31 @@ static char * setupIsoImages(char * device, char * dirName, char * location) {
logMessage(INFO, "Looking for updates for HD in %s", updpath);
copyUpdatesImg(updpath);
- rc = mountLoopback(path, "/tmp/loopimage", "/dev/loop0");
+ rc = mountLoopback(path, "/mnt/source", "/dev/loop0");
if (!rc) {
/* This code is for copying small stage2 into ram */
/* and mounting */
- rc = loadHDImages("/tmp/loopimage", "/", "/dev/loop1",
+ rc = loadHDImages("/mnt/source", "/", "/dev/loop1",
"/mnt/runtime", location);
if (rc) {
newtWinMessage(_("Error"), _("OK"),
_("An error occured reading the install "
"from the ISO images. Please check your ISO "
"images and try again."));
+ umountLoopback("/mnt/source", "/dev/loop0");
+ umount("/mnt/isodir");
} else {
queryIsoMediaCheck(path);
}
}
-
- /* we copied stage2 into RAM so we can now umount image */
- umountLoopback("/tmp/loopimage", "/dev/loop0");
-
} else {
rc = 1;
}
- /* we copied stage2 into RAM so now umount partition */
- umount("/tmp/hdimage");
- if (rc)
+ if (rc) {
+ umount("/mnt/isodir");
return NULL;
+ }
} else {
/* in test mode I dont know what to do - just pretend I guess */
type = typetry;
@@ -401,9 +398,6 @@ char * mountHardDrive(struct installMethod * method,
}
done = 1;
-
- umount("/tmp/hdimage");
- rmdir("/tmp/hdimage");
}
free(dir);