]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/install+setup/setup/main.c
Imported french install lang from "IfXen" and add it to build.
[people/pmueller/ipfire-2.x.git] / src / install+setup / setup / main.c
index f168220e10183055f9a70ef91e19cb1cb044bc59..f0d36045d9a4dc97cef5a4a55dbcdc40baf7b59b 100644 (file)
@@ -5,10 +5,6 @@
  *
  * (c) Lawrence Manning, 2001
  * Contains main entry point, and misc functions.
- * 
- * modified 16/11/2002 eoberlander - French language added
- *
- * $Id: main.c,v 1.4.2.7 2005/12/01 20:13:08 eoberlander Exp $
  *
  */
 
@@ -21,8 +17,13 @@ char **ctr = NULL;
 
 int automode = 0;
 
+struct  nic  nics[20] = { { "" , "" , "" , "" } };
+struct knic knics[20] = { { "" , "" , "" , "" } };
+
 extern char *en_tr[];
 extern char *de_tr[];
+extern char *fr_tr[];
+
 
 int main(int argc, char *argv[])
 {
@@ -30,8 +31,8 @@ int main(int argc, char *argv[])
        char *shortlangnames[] = { "en", NULL };
        char **langtrs[] = { en_tr, NULL };
 #else
-       char *shortlangnames[] = { "de", "en", NULL };
-       char **langtrs[] = { de_tr, en_tr, NULL };
+       char *shortlangnames[] = { "de", "en", "fr", NULL };
+       char **langtrs[] = { de_tr, en_tr, fr_tr, NULL };
 #endif
        int choice;
        char *sections[11]; /* need to fill this out AFTER knowning lang */
@@ -59,6 +60,9 @@ int main(int argc, char *argv[])
 
        fprintf(flog, "Setup program started.\n");
 
+       if (!setlocale(LC_CTYPE,""))
+               fprintf(flog, "Locale not spezified. Check LANG, LC_CTYPE, RC_ALL.");
+
        kv = initkeyvalues();
        if (!(readkeyvalues(kv, CONFIG_ROOT "/main/settings")))
        {
@@ -78,7 +82,6 @@ int main(int argc, char *argv[])
 
        if (!ctr)
        {
-               /* zh,lt,ro,ru,th languages not available in setup, so use English */
                for (choice = 0; shortlangnames[choice]; choice++)
                {
                        if (strcmp(shortlangnames[choice], "en") == 0)
@@ -93,8 +96,8 @@ int main(int argc, char *argv[])
        sections[1] = ctr[TR_TIMEZONE];
        sections[2] = ctr[TR_HOSTNAME];
        sections[3] = ctr[TR_DOMAINNAME];
-       sections[4] = ctr[TR_ISDN_CONFIGURATION];
-       sections[5] = ctr[TR_NETWORKING];
+       sections[4] = ctr[TR_NETWORKING];
+       sections[5] = ctr[TR_ISDN];
        sections[6] = ctr[TR_ROOT_PASSWORD];
        sections[7] = ctr[TR_ADMIN_PASSWORD];
        sections[8] = NULL;
@@ -145,11 +148,11 @@ int main(int argc, char *argv[])
                                        break;
 
                                case 4:
-                                       handleisdn();
+                                       handlenetworking();
                                        break;
-
+                               
                                case 5:
-                                       handlenetworking();
+                                       handleisdn();
                                        break;
 
                                case 6:
@@ -175,16 +178,16 @@ int main(int argc, char *argv[])
                        goto EXIT;
                if (!(handledomainname()))
                        goto EXIT;
+               if (!(handlerootpassword()))
+                       goto EXIT;
+               if (!(handleadminpassword()))
+                       goto EXIT;
                if (!(handleisdn()))
                        goto EXIT;
                if (!(handlenetworking()))
                        goto EXIT;
                if (!(handledhcp()))
                        goto EXIT;
-               if (!(handlerootpassword()))
-                       goto EXIT;
-               if (!(handleadminpassword()))
-                       goto EXIT;
 
                autook = 1;
        }
@@ -207,4 +210,3 @@ EXIT:
 
        return 0;
 }
-