summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2001-06-29 20:19:14 +0000
committerErik Troan <ewt@redhat.com>2001-06-29 20:19:14 +0000
commite4eeccd943b8dd81c10a7a5a47550fb60ecd763e (patch)
tree46dd63ece15156d8bc72eb33a050efe88626157e /loader
parentfc303be29307115ddbf8e1bf833553b916d1e7eb (diff)
downloadanaconda-e4eeccd943b8dd81c10a7a5a47550fb60ecd763e.tar.gz
anaconda-e4eeccd943b8dd81c10a7a5a47550fb60ecd763e.tar.xz
anaconda-e4eeccd943b8dd81c10a7a5a47550fb60ecd763e.zip
support ftp installs from mounted isos
Diffstat (limited to 'loader')
-rw-r--r--loader/loader.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/loader/loader.c b/loader/loader.c
index c9bdd5d72..261621c2a 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1165,23 +1165,47 @@ static int loadSingleUrlImage(struct iurlinfo * ui, char * file, int flags,
char * dest, char * mntpoint, char * device) {
int fd;
int rc;
+ char * newFile = NULL;
- fd = urlinstStartTransfer(ui, file);
+ fd = urlinstStartTransfer(ui, file, 1);
- if (fd < 0)
- return 1;
+ if (fd == -2) return 1;
+
+ if (fd < 0) {
+ /* file not found */
+
+ newFile = alloca(strlen(device) + 20);
+ sprintf(newFile, "disc1/%s", file);
+
+ fd = urlinstStartTransfer(ui, newFile, 1);
+
+ if (fd == -2) return 1;
+ if (fd < 0) {
+ newtWinMessage(_("Error"), _("OK"),
+ _("File %s/%s not found on server."),
+ ui->prefix, file);
+ return 1;
+ }
+ }
rc = setupStage2Image(fd, dest, flags, device, mntpoint);
urlinstFinishTransfer(ui, fd);
+ if (newFile) {
+ newFile = malloc(strlen(ui->prefix ) + 20);
+ sprintf(newFile, "%s/disc1", ui->prefix);
+ free(ui->prefix);
+ ui->prefix = newFile;
+ }
+
return rc;
}
static int loadUrlImages(struct iurlinfo * ui, int flags) {
setupRamdisk();
- if (loadSingleUrlImage(ui, "base/netstg1.img", flags,
+ if (loadSingleUrlImage(ui, "RedHat/base/netstg1.img", flags,
"/tmp/ramfs/netstg1.img",
"/mnt/runtime", "loop0")) {
newtWinMessage(ui->protocol == URL_METHOD_FTP ?