]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/install+setup/install/main.c
Quasi fast alle cgis von den fixen header farben befreit
[people/teissler/ipfire-2.x.git] / src / install+setup / install / main.c
index 7e5c681b60cad26942d134f4e0e80f7d3e47e3b1..794f027fe2124381001ffac0833fac6f7fde2283 100644 (file)
@@ -25,6 +25,9 @@ char **ctr;
 
 extern char url[STRING_SIZE];
 
+struct  nic  nics[20] = { { "" , "" } }; // only defined for compile
+struct knic knics[20] = { { "" , "" , "" } }; // only defined for compile
+
 extern char *en_tr[];
 extern char *de_tr[];
 
@@ -83,7 +86,8 @@ int main(int argc, char *argv[])
        long memory = 0;
        long system_partition, boot_partition, root_partition, swap_file;
        int scsi_disk = 0;
-       char *yesnoharddisk[] = { "NO", "YES", NULL };
+       char *yesnoharddisk[3]; //      char *yesnoharddisk = { "NO", "YES", NULL };
+               
        int unattended = 0;
        struct keyvalue *unattendedkv = initkeyvalues();
        int hardyn = 0;
@@ -151,8 +155,6 @@ int main(int argc, char *argv[])
        strcpy(shortlangname, shortlangnames[choice]);
        fprintf(flog, "Selected language: %s\n", shortlangname);
 
-       mysystem("/bin/setfont lat0-16");
-
        newtDrawRootText(14, 0, NAME " " VERSION " - " SLOGAN );
        newtPushHelpLine(ctr[TR_HELPLINE]);
        sprintf (title, "%s %s - %s", NAME, VERSION, SLOGAN);
@@ -300,6 +302,11 @@ int main(int argc, char *argv[])
        if (unattended) {
            hardyn = 1;
        }
+
+       yesnoharddisk[0] = ctr[TR_NO];
+       yesnoharddisk[1] = ctr[TR_YES];
+       yesnoharddisk[2] = NULL;
+
        while (! hardyn) {
                rc = newtWinMenu(title, message,
                                 50, 5, 5, 6, yesnoharddisk,
@@ -559,12 +566,12 @@ int main(int argc, char *argv[])
        mysystem("/bin/installbootsplash.sh");
 
        mysystem("ln -s grub.conf /harddisk/boot/grub/menu.lst");
-       mysystem("umount /harddisk/proc");
-       mysystem("umount /harddisk/dev");
+//     mysystem("umount /harddisk/proc");
+//     mysystem("umount /harddisk/dev");
 
        if (!unattended) {
                sprintf(message, ctr[TR_CONGRATULATIONS_LONG],
-                               NAME, SNAME, SNAME, NAME, NAME, NAME);
+                               NAME, SNAME, NAME);
                newtWinMessage(ctr[TR_CONGRATULATIONS], ctr[TR_OK], message);
        }
                 
@@ -573,6 +580,8 @@ int main(int argc, char *argv[])
 EXIT:
        fprintf(flog, "Install program ended.\n");      
 
+
+
        if (!(allok))
                newtWinMessage(title, ctr[TR_OK], ctr[TR_PRESS_OK_TO_REBOOT]);  
        
@@ -582,10 +591,10 @@ EXIT:
        {
                /* /proc is needed by the module checker.  We have to mount it
                 * so it can be seen by setup, which is run chrooted. */
-               if (system("/bin/mount proc -t proc /harddisk/proc"))
-                       printf("Unable to mount proc in /harddisk.");
-               else
-               {
+//             if (system("/bin/mount proc -t proc /harddisk/proc"))
+//                     printf("Unable to mount proc in /harddisk.");
+//             else
+//             {
                        if (unattended) {
                            fprintf(flog, "Entering unattended setup\n");
                            if (unattended_setup(unattendedkv)) {
@@ -597,9 +606,9 @@ EXIT:
                            }
                        }
 
-                       newtFinished();
                        fflush(flog);
                        fclose(flog);
+                       newtFinished();
 
                        if (!unattended) {
                                        // Copy our scanned nics to the disk and lock because scan doesn't work in chroot
@@ -612,8 +621,13 @@ EXIT:
 
                        if (system("/bin/umount /harddisk/proc"))
                                printf("Unable to umount /harddisk/proc.\n"); 
-               }
+//             }
+       } else {
+               fflush(flog);
+               fclose(flog);
+               newtFinished();
        }
+
        fcloseall();
 
        if (swap_file) {
@@ -622,6 +636,9 @@ EXIT:
 
        newtFinished();
 
+       system("/bin/umount /harddisk/proc");
+       system("/bin/umount /harddisk/dev");
+
        system("/bin/umount /harddisk/var");
        system("/bin/umount /harddisk/boot");
        system("/bin/umount /harddisk");