summaryrefslogtreecommitdiffstats
path: root/loader2/nfsinstall.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/nfsinstall.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/nfsinstall.c')
-rw-r--r--loader2/nfsinstall.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c
index 4f8e9ff5c..80e8ea1e5 100644
--- a/loader2/nfsinstall.c
+++ b/loader2/nfsinstall.c
@@ -132,10 +132,13 @@ char * mountNfsImage(struct installMethod * method,
stage = NFS_STAGE_NFS;
if (!doPwMount(fullPath, "/mnt/source", "nfs", 1, 0, NULL, NULL, 0, 0)) {
+ char mntPath[1024];
+
logMessage("mounted %s on /mnt/source", fullPath);
- if (!access("/mnt/source/RedHat/base/stage2.img", R_OK)) {
+ snprintf(mntPath, sizeof(mntPath), "/mnt/source/%s/base/stage2.img", getProductPath());
+ if (!access(mntPath, R_OK)) {
logMessage("can access stage2.img");
- rc = mountStage2("/mnt/source/RedHat/base/stage2.img");
+ rc = mountStage2(mntPath);
logMessage("after mountStage2, rc is %d", rc);
if (rc) {
if (rc == -1) {
@@ -156,7 +159,8 @@ char * mountNfsImage(struct installMethod * method,
if (mountLoopback(path, "/mnt/source2", "loop1"))
logMessage("failed to mount iso %s loopback", path);
else {
- rc = mountStage2("/mnt/source2/RedHat/base/stage2.img");
+ snprintf(mntPath, sizeof(mntPath), "/mnt/source2/%s/base/stage2.img", getProductPath());
+ rc = mountStage2(mntPath);
if (rc) {
umountLoopback("/mnt/source2", "loop1");
if (rc == -1)
@@ -164,8 +168,10 @@ char * mountNfsImage(struct installMethod * method,
} else {
/* JKFIXME: hack because /mnt/source is hard-coded
* in mountStage2() */
- copyUpdatesImg("/mnt/source2/RedHat/base/updates.img");
- copyProductImg("/mnt/source2/RedHat/base/product.img");
+ snprintf(mntPath, sizeof(mntPath), "/mnt/source2/%s/base/updates.img", getProductPath());
+ copyUpdatesImg(mntPath);
+ snprintf(mntPath, sizeof(mntPath), "/mnt/source2/%s/base/product.img", getProductPath());
+ copyProductImg(mntPath);
queryIsoMediaCheck(path, flags);