]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/install+setup/install/main.c
Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next
[ipfire-2.x.git] / src / install+setup / install / main.c
index ea47593cd30e36a8f6baa75a6221ba32de1667b6..14139b5c910c30576645d56597cede3b916fce6c 100644 (file)
@@ -12,7 +12,7 @@
 #include "install.h"
 #define _GNU_SOURCE
  
-#define INST_FILECOUNT 10700
+#define INST_FILECOUNT 14400
 #define UNATTENDED_CONF "/cdrom/boot/unattended.conf"
 #define LICENSE_FILE   "/cdrom/COPYING"
 
@@ -35,6 +35,7 @@ extern char *en_tr[];
 extern char *es_tr[];
 extern char *de_tr[];
 extern char *fr_tr[];
+extern char *nl_tr[];
 extern char *pl_tr[];
 extern char *ru_tr[];
 
@@ -43,11 +44,12 @@ int main(int argc, char *argv[])
 
        char discl_msg[40000] = "Disclaimer\n";
 
-       char *langnames[] = { "Deutsch", "English", "Français", "Español", "Polski", "Русский", NULL };
-       char *shortlangnames[] = { "de", "en", "fr", "es", "pl", "ru", NULL };
-       char **langtrs[] = { de_tr, en_tr, fr_tr, es_tr, pl_tr, ru_tr, NULL };
+       char *langnames[] = { "Deutsch", "English", "Français", "Español", "Nederlands", "Polski", "Русский", NULL };
+       char *shortlangnames[] = { "de", "en", "fr", "es", "nl", "pl", "ru", NULL };
+       char **langtrs[] = { de_tr, en_tr, fr_tr, es_tr, nl_tr, pl_tr, ru_tr, NULL };
        char hdletter;
        char harddrive[30], sourcedrive[5];     /* Device holder. */
+       char harddrive_info[STRING_SIZE];       /* Additional infos about target */
        struct devparams hdparams, cdromparams; /* Params for CDROM and HD */
        int rc = 0;
        char commandstring[STRING_SIZE];
@@ -57,7 +59,6 @@ int main(int argc, char *argv[])
        int choice;
        int i;
        int found = 0;
-       int firstrun = 0;
        char shortlangname[10];
        char message[1000];
        char title[STRING_SIZE];
@@ -203,13 +204,8 @@ int main(int argc, char *argv[])
                                found = 1;
                                break;
                        case 10: // No harddisk found
-                               if (firstrun == 1) {
-                                       errorbox(ctr[TR_NO_HARDDISK]);
-                                       goto EXIT;
-                               }
-                               // Do this if the kudzu-scan fails...
-                               runcommandwithstatus("/bin/probehw.sh deep-scan", ctr[TR_PROBING_HARDWARE]);
-                               firstrun = 1;
+                               errorbox(ctr[TR_NO_HARDDISK]);
+                               goto EXIT;
                }
        }
 
@@ -219,6 +215,12 @@ int main(int argc, char *argv[])
        }
        fgets(harddrive, 30, handle);
        fclose(handle);
+       if ((handle = fopen("/tmp/dest_device_info", "r")) == NULL) {
+               sprintf(harddrive_info, "%s", harddrive);
+       }
+       fgets(harddrive_info, 70, handle);
+       fclose(handle);
+
                        
        /* load unattended configuration */
        if (unattended) {
@@ -242,7 +244,7 @@ int main(int argc, char *argv[])
 
        fprintf(flog, "Destination drive: %s\n", hdparams.devnode_disk);
        
-       sprintf(message, ctr[TR_PREPARE_HARDDISK], hdparams.devnode_disk);
+       sprintf(message, ctr[TR_PREPARE_HARDDISK], harddrive_info);
        if (unattended) {
            hardyn = 1;
        } else {
@@ -329,7 +331,7 @@ int main(int argc, char *argv[])
                
        
   /* Calculating the amount of free space */
-       boot_partition = 20; /* in MB */
+       boot_partition = 64; /* in MB */
        system_partition = disk - ( root_partition + swap_file + boot_partition );
        
        fprintf(flog, ", boot = %ld, swap = %ld, mylog = %ld, root = %ld\n",
@@ -375,7 +377,7 @@ int main(int argc, char *argv[])
                errorbox(ctr[TR_UNABLE_TO_PARTITION]);
                goto EXIT;
        }
-       
+
        if (fstype == EXT2) {
 //             mysystem("/sbin/modprobe ext2");
                sprintf(mkfscommand, "/sbin/mke2fs -T ext2");
@@ -517,7 +519,7 @@ int main(int argc, char *argv[])
         */
        FILE *f = NULL;
        if (f = fopen("/harddisk/boot/grub/device.map", "w")) {
-               fprintf(f, "(hd0) %s\n", hdparams.devnode_part);
+               fprintf(f, "(hd0) %s\n", hdparams.devnode_disk);
                fclose(f);
        }