- while (!sourcedrive) {
- snprintf(commandstring, sizeof(commandstring), "/usr/bin/downloadsource.sh %s", SOURCE_TEMPFILE);
- runcommandwithstatus(commandstring, title, _("Downloading installation image..."), logfile);
-
- FILE* f = fopen(SOURCE_TEMPFILE, "r");
- if (f) {
- sourcedrive = SOURCE_TEMPFILE;
- fclose(f);
- } else {
- rc = newtWinOkCancel(title, _("The installation image could not be downloaded."),
- 60, 8, _("Retry"), _("Cancel"));
+ if (config.perform_download) {
+ fprintf(flog, "Download URL: %s\n", config.download_url);
+ snprintf(commandstring, sizeof(commandstring), "/usr/bin/downloadsource.sh %s %s",
+ SOURCE_TEMPFILE, config.download_url);
+
+ while (!sourcedrive) {
+ rc = runcommandwithstatus(commandstring, title, _("Downloading installation image..."), logfile);
+
+ FILE* f = fopen(SOURCE_TEMPFILE, "r");
+ if (f) {
+ sourcedrive = SOURCE_TEMPFILE;
+ fclose(f);
+ } else {
+ char reason[STRING_SIZE] = "-";
+ if (rc == 2)
+ snprintf(reason, sizeof(STRING_SIZE), _("MD5 checksum mismatch"));