summaryrefslogtreecommitdiffstats
path: root/loader2/method.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/method.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/method.c')
-rw-r--r--loader2/method.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/loader2/method.c b/loader2/method.c
index 0a9694462..faa85ae89 100644
--- a/loader2/method.c
+++ b/loader2/method.c
@@ -143,6 +143,7 @@ char * validIsoImages(char * dirName) {
DIR * dir;
struct dirent * ent;
char isoImage[1024];
+ char path[1024];
if (!(dir = opendir(dirName))) {
newtWinMessage(_("Error"), _("OK"),
@@ -167,7 +168,8 @@ char * validIsoImages(char * dirName) {
continue;
}
- if (!access("/tmp/loopimage/RedHat/base/hdstg2.img", F_OK)) {
+ snprintf(path, sizeof(path), "/tmp/loopimage/%s/base/hdstg2.img", getProductPath());
+ if (!access(path, F_OK)) {
umountLoopback("/tmp/loopimage", "loop7");
break;
}
@@ -570,6 +572,7 @@ void umountStage2(void) {
/* mount a second stage, verify the stamp file, copy updates
* Returns 0 on success, 1 on failure to mount, -1 on bad stamp */
int mountStage2(char * path) {
+ char imgPath[1024];
if (access(path, R_OK)) {
return 1;
}
@@ -584,10 +587,12 @@ int mountStage2(char * path) {
}
/* JKFIXME: this is kind of silly.. /mnt/source is hardcoded :/ */
- copyUpdatesImg("/mnt/source/RedHat/base/updates.img");
+ snprintf(imgPath, sizeof(imgPath), "/mnt/source/%s/base/updates.img", getProductPath());
+ copyUpdatesImg(imgPath);
/* more hard coding */
- copyProductImg("/mnt/source/RedHat/base/product.img");
+ snprintf(imgPath, sizeof(imgPath), "/mnt/source/%s/base/product.img", getProductPath());
+ copyProductImg(imgPath);
return 0;
}