*
* (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 $
*
*/
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[])
{
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 */
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")))
{
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)
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;
break;
case 4:
- handleisdn();
+ handlenetworking();
break;
-
+
case 5:
- handlenetworking();
+ handleisdn();
break;
case 6:
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;
}
return 0;
}
-