summaryrefslogtreecommitdiffstats
path: root/loader2/cdinstall.c
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-10-14 19:36:32 +0000
committerJeremy Katz <katzj@redhat.com>2003-10-14 19:36:32 +0000
commit60a8f9866e39b0eb0f5f0e15057f36679d007522 (patch)
treee86d39f59a06ada627d57addf02b31810730853d /loader2/cdinstall.c
parent6af42d3070c2528db2c3fb47a3613e150ef1c449 (diff)
downloadanaconda-60a8f9866e39b0eb0f5f0e15057f36679d007522.tar.gz
anaconda-60a8f9866e39b0eb0f5f0e15057f36679d007522.tar.xz
anaconda-60a8f9866e39b0eb0f5f0e15057f36679d007522.zip
read product path from the build stamp if possible, default to RedHat if not
available. basically notting's patch with some fixes and genhdlist handled
Diffstat (limited to 'loader2/cdinstall.c')
-rw-r--r--loader2/cdinstall.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/loader2/cdinstall.c b/loader2/cdinstall.c
index 5344ffe69..3e2231029 100644
--- a/loader2/cdinstall.c
+++ b/loader2/cdinstall.c
@@ -147,6 +147,7 @@ static void wrongCDMessage(void) {
static void mountCdromStage2(char *cddev) {
int gotcd1=0;
int rc;
+ char path[1024];
devMakeInode(cddev, "/tmp/cdrom");
do {
@@ -160,7 +161,8 @@ static void mountCdromStage2(char *cddev) {
}
} while (1);
- rc = mountStage2("/mnt/source/RedHat/base/stage2.img");
+ snprintf(path, sizeof(path), "/mnt/source/%s/base/stage2.img", getProductPath());
+ rc = mountStage2(path);
/* if we failed, umount /mnt/source and keep going */
if (rc) {
@@ -318,7 +320,10 @@ char * setupCdrom(char * location,
devMakeInode(kd->known[i].name, "/tmp/cdrom");
if (!doPwMount("/tmp/cdrom", "/mnt/source", "iso9660", 1, 0,
NULL, NULL, 0, 0)) {
- if (!access("/mnt/source/RedHat/base/stage2.img", R_OK) &&
+ char path[1024];
+
+ snprintf(path, sizeof(path), "/mnt/source/%s/base/stage2.img", getProductPath());
+ if (!access(path, R_OK) &&
(!requirepkgs || !access("/mnt/source/.discinfo", R_OK))) {
@@ -326,11 +331,13 @@ char * setupCdrom(char * location,
/* free up the CD drive and user can have it avaiable to */
/* aid system recovery. */
if (FL_RESCUE(flags) && totalMemory() > 128000) {
- rc = copyFile("/mnt/source/RedHat/base/stage2.img", "/tmp/ramfs/stage2.img");
+ snprintf(path, sizeof(path), "/mnt/source/%s/base/stage2.img", getProductPath());
+ rc = copyFile(path, "/tmp/ramfs/stage2.img");
stage2img = "/tmp/ramfs/stage2.img";
stage2inram = 1;
} else {
- stage2img = "/mnt/source/RedHat/base/stage2.img";
+ snprintf(path, sizeof(path), "/mnt/source/%s/base/stage2.img", getProductPath());
+ stage2img = strdup(path);
stage2inram = 0;
}