]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/install+setup/install/main.c
Installer: Add installmedia download support.
[people/pmueller/ipfire-2.x.git] / src / install+setup / install / main.c
index 1f615d0d63c74166f30dbde4d99234b0c46b8524..5de914f7612c02106428bfd217a93e12d7debeaa 100644 (file)
@@ -156,19 +156,17 @@ int main(int argc, char *argv[])
                }
        }
 
-       switch (mysystem("/bin/mountsource.sh")) {
-           case 0:
-                               break;
-           case 10:
-       errorbox(ctr[TR_NO_CDROM]);
-               goto EXIT;
-       }
+       mysystem("/bin/mountsource.sh");
 
-       /* read source drive letter */
        if ((handle = fopen("/tmp/source_device", "r")) == NULL) {
-               errorbox(ctr[TR_ERROR_PROBING_CDROM]);
-               goto EXIT;
+               newtWinMessage(title, ctr[TR_OK], ctr[TR_NO_LOCAL_SOURCE]);
+               runcommandwithstatus("/bin/downloadsource.sh",ctr[TR_DOWNLOADING_ISO]);
+               if ((handle = fopen("/tmp/source_device", "r")) == NULL) {
+                       errorbox(ctr[TR_DOWNLOAD_ERROR]);
+                       goto EXIT;
+               }
        }
+
        fgets(sourcedrive, 5, handle);
        fprintf(flog, "Source drive: %s\n", sourcedrive);
        fclose(handle);