mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
Patched the installer for configuring the firewill without a red device.
(This is only for testing purposes...!) git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@1037 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -557,5 +557,15 @@ char *de_tr[] = {
|
|||||||
"Nein",
|
"Nein",
|
||||||
/* TR_AS */
|
/* TR_AS */
|
||||||
"als",
|
"als",
|
||||||
|
/* TR_IGNORE */
|
||||||
|
"Ignorieren",
|
||||||
|
/* TR_PPP_DIALUP */
|
||||||
|
"PPP Einwahl (PPPoE, Modem, ATM ...)",
|
||||||
|
/* TR_DHCP */
|
||||||
|
"DHCP",
|
||||||
|
/* TR_DHCP_STARTSERVER */
|
||||||
|
"Starte den DHCP-Server ...",
|
||||||
|
/* TR_DHCP_STOPSERVER */
|
||||||
|
"Stoppe den DHCP-Server ...",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -553,5 +553,16 @@ char *en_tr[] = {
|
|||||||
"No",
|
"No",
|
||||||
/* TR_AS */
|
/* TR_AS */
|
||||||
"as",
|
"as",
|
||||||
|
/* TR_IGNORE */
|
||||||
|
"Ignore",
|
||||||
|
/* TR_PPP_DIALUP */
|
||||||
|
"PPP DIALUP (PPPoE, Modem, ATM ...)",
|
||||||
|
/* TR_DHCP */
|
||||||
|
"DHCP",
|
||||||
|
/* TR_DHCP_STARTSERVER */
|
||||||
|
"Starting DHCP-Server ...",
|
||||||
|
/* TR_DHCP_STOPSERVER */
|
||||||
|
"Stopping DHCP-Server ...",
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -92,8 +92,8 @@ int changeaddress(struct keyvalue *kv, char *colour, int typeflag,
|
|||||||
if (strcmp(temp, "DHCP") == 0) startdhcptype = 1;
|
if (strcmp(temp, "DHCP") == 0) startdhcptype = 1;
|
||||||
if (strcmp(temp, "PPPOE") == 0) startpppoetype = 1;
|
if (strcmp(temp, "PPPOE") == 0) startpppoetype = 1;
|
||||||
statictyperadio = newtRadiobutton(2, 4, ctr[TR_STATIC], startstatictype, NULL);
|
statictyperadio = newtRadiobutton(2, 4, ctr[TR_STATIC], startstatictype, NULL);
|
||||||
dhcptyperadio = newtRadiobutton(2, 5, "DHCP", startdhcptype, statictyperadio);
|
dhcptyperadio = newtRadiobutton(2, 5, ctr[TR_DHCP], startdhcptype, statictyperadio);
|
||||||
pppoetyperadio = newtRadiobutton(2, 6, "PPPOE", startpppoetype, dhcptyperadio);
|
pppoetyperadio = newtRadiobutton(2, 6, ctr[TR_PPP_DIALUP], startpppoetype, dhcptyperadio);
|
||||||
newtFormAddComponents(networkform, statictyperadio, dhcptyperadio,
|
newtFormAddComponents(networkform, statictyperadio, dhcptyperadio,
|
||||||
pppoetyperadio, NULL);
|
pppoetyperadio, NULL);
|
||||||
newtComponentAddCallback(statictyperadio, networkdialogcallbacktype, NULL);
|
newtComponentAddCallback(statictyperadio, networkdialogcallbacktype, NULL);
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ int configtypecards[] = {
|
|||||||
|
|
||||||
int netaddresschange;
|
int netaddresschange;
|
||||||
|
|
||||||
int oktoleave(char *errormessage);
|
int oktoleave(void);
|
||||||
int firstmenu(void);
|
int firstmenu(void);
|
||||||
int configtypemenu(void);
|
int configtypemenu(void);
|
||||||
int drivermenu(void);
|
int drivermenu(void);
|
||||||
@@ -61,7 +61,6 @@ int handlenetworking(void)
|
|||||||
int done;
|
int done;
|
||||||
int choice;
|
int choice;
|
||||||
int found;
|
int found;
|
||||||
char errormessage[STRING_SIZE];
|
|
||||||
|
|
||||||
netaddresschange = 0;
|
netaddresschange = 0;
|
||||||
|
|
||||||
@@ -92,10 +91,7 @@ int handlenetworking(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
if (oktoleave(errormessage))
|
if (oktoleave()) done = 1;
|
||||||
done = 1;
|
|
||||||
else
|
|
||||||
errorbox(errormessage);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -121,11 +117,12 @@ int handlenetworking(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int oktoleave(char *errormessage)
|
int oktoleave(void)
|
||||||
{
|
{
|
||||||
struct keyvalue *kv = initkeyvalues();
|
struct keyvalue *kv = initkeyvalues();
|
||||||
char temp[STRING_SIZE];
|
char temp[STRING_SIZE];
|
||||||
int configtype;
|
int configtype;
|
||||||
|
int rc;
|
||||||
|
|
||||||
if (!(readkeyvalues(kv, CONFIG_ROOT "/ethernet/settings")))
|
if (!(readkeyvalues(kv, CONFIG_ROOT "/ethernet/settings")))
|
||||||
{
|
{
|
||||||
@@ -142,27 +139,35 @@ int oktoleave(char *errormessage)
|
|||||||
strcpy(temp, ""); findkey(kv, "GREEN_DEV", temp);
|
strcpy(temp, ""); findkey(kv, "GREEN_DEV", temp);
|
||||||
if (!(strlen(temp)))
|
if (!(strlen(temp)))
|
||||||
{
|
{
|
||||||
strcpy(errormessage, ctr[TR_NO_GREEN_INTERFACE]);
|
errorbox(ctr[TR_NO_GREEN_INTERFACE]);
|
||||||
goto EXIT;
|
freekeyvalues(kv);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
if (!(interfacecheck(kv, "GREEN")))
|
if (!(interfacecheck(kv, "GREEN")))
|
||||||
{
|
{
|
||||||
strcpy(errormessage, ctr[TR_MISSING_GREEN_IP]);
|
errorbox(ctr[TR_MISSING_GREEN_IP]);
|
||||||
goto EXIT;
|
freekeyvalues(kv);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (HAS_RED)
|
if (HAS_RED)
|
||||||
{
|
{
|
||||||
|
|
||||||
strcpy(temp, ""); findkey(kv, "RED_DEV", temp);
|
strcpy(temp, ""); findkey(kv, "RED_DEV", temp);
|
||||||
if (!(strlen(temp)))
|
if (!(strlen(temp)))
|
||||||
{
|
{
|
||||||
strcpy(errormessage, ctr[TR_NO_RED_INTERFACE]);
|
rc = newtWinChoice(ctr[TR_ERROR], ctr[TR_OK], ctr[TR_IGNORE], ctr[TR_NO_RED_INTERFACE]);
|
||||||
goto EXIT;
|
if (rc == 0 || rc == 1)
|
||||||
|
{
|
||||||
|
freekeyvalues(kv);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!(interfacecheck(kv, "RED")))
|
if (!(interfacecheck(kv, "RED")))
|
||||||
{
|
{
|
||||||
strcpy(errormessage, ctr[TR_MISSING_RED_IP]);
|
errorbox(ctr[TR_MISSING_RED_IP]);
|
||||||
goto EXIT;
|
freekeyvalues(kv);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (HAS_ORANGE)
|
if (HAS_ORANGE)
|
||||||
@@ -170,13 +175,15 @@ int oktoleave(char *errormessage)
|
|||||||
strcpy(temp, ""); findkey(kv, "ORANGE_DEV", temp);
|
strcpy(temp, ""); findkey(kv, "ORANGE_DEV", temp);
|
||||||
if (!(strlen(temp)))
|
if (!(strlen(temp)))
|
||||||
{
|
{
|
||||||
strcpy(errormessage, ctr[TR_NO_ORANGE_INTERFACE]);
|
errorbox(ctr[TR_NO_ORANGE_INTERFACE]);
|
||||||
goto EXIT;
|
freekeyvalues(kv);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
if (!(interfacecheck(kv, "ORANGE")))
|
if (!(interfacecheck(kv, "ORANGE")))
|
||||||
{
|
{
|
||||||
strcpy(errormessage, ctr[TR_MISSING_ORANGE_IP]);
|
errorbox(ctr[TR_MISSING_ORANGE_IP]);
|
||||||
goto EXIT;
|
freekeyvalues(kv);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (HAS_BLUE)
|
if (HAS_BLUE)
|
||||||
@@ -184,13 +191,15 @@ int oktoleave(char *errormessage)
|
|||||||
strcpy(temp, ""); findkey(kv, "BLUE_DEV", temp);
|
strcpy(temp, ""); findkey(kv, "BLUE_DEV", temp);
|
||||||
if (!(strlen(temp)))
|
if (!(strlen(temp)))
|
||||||
{
|
{
|
||||||
strcpy(errormessage, ctr[TR_NO_BLUE_INTERFACE]);
|
errorbox(ctr[TR_NO_BLUE_INTERFACE]);
|
||||||
goto EXIT;
|
freekeyvalues(kv);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
if (!(interfacecheck(kv, "BLUE")))
|
if (!(interfacecheck(kv, "BLUE")))
|
||||||
{
|
{
|
||||||
strcpy(errormessage, ctr[TR_MISSING_BLUE_IP]);
|
errorbox(ctr[TR_MISSING_BLUE_IP]);
|
||||||
goto EXIT;
|
freekeyvalues(kv);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (configtype == 0)
|
if (configtype == 0)
|
||||||
@@ -198,24 +207,19 @@ int oktoleave(char *errormessage)
|
|||||||
strcpy(temp, ""); findkey(kv, "DNS1", temp);
|
strcpy(temp, ""); findkey(kv, "DNS1", temp);
|
||||||
if (!(strlen(temp)))
|
if (!(strlen(temp)))
|
||||||
{
|
{
|
||||||
strcpy(errormessage, ctr[TR_MISSING_DNS]);
|
errorbox(ctr[TR_MISSING_DNS]);
|
||||||
goto EXIT;
|
freekeyvalues(kv);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
strcpy(temp, ""); findkey(kv, "DEFAULT_GATEWAY", temp);
|
strcpy(temp, ""); findkey(kv, "DEFAULT_GATEWAY", temp);
|
||||||
if (!(strlen(temp)))
|
if (!(strlen(temp)))
|
||||||
{
|
{
|
||||||
strcpy(errormessage, ctr[TR_MISSING_DEFAULT]);
|
errorbox(ctr[TR_MISSING_DEFAULT]);
|
||||||
goto EXIT;
|
freekeyvalues(kv);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
strcpy(errormessage, "");
|
return 1;
|
||||||
EXIT:
|
|
||||||
freekeyvalues(kv);
|
|
||||||
|
|
||||||
if (strlen(errormessage))
|
|
||||||
return 0;
|
|
||||||
else
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -284,8 +288,6 @@ int configtypemenu(void)
|
|||||||
findkey(kv, "CONFIG_TYPE", temp); choise = atol(temp);
|
findkey(kv, "CONFIG_TYPE", temp); choise = atol(temp);
|
||||||
choise--;
|
choise--;
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
sprintf(message, ctr[TR_NETWORK_CONFIGURATION_TYPE_LONG], NAME);
|
sprintf(message, ctr[TR_NETWORK_CONFIGURATION_TYPE_LONG], NAME);
|
||||||
rc = newtWinMenu(ctr[TR_NETWORK_CONFIGURATION_TYPE], message, 50, 5, 5,
|
rc = newtWinMenu(ctr[TR_NETWORK_CONFIGURATION_TYPE], message, 50, 5, 5,
|
||||||
6, configtypenames, &choise, ctr[TR_OK], ctr[TR_CANCEL], NULL);
|
6, configtypenames, &choise, ctr[TR_OK], ctr[TR_CANCEL], NULL);
|
||||||
@@ -293,8 +295,6 @@ int configtypemenu(void)
|
|||||||
sprintf(message, ctr[TR_NOT_ENOUGH_INTERFACES] , configtypecards[choise], found);
|
sprintf(message, ctr[TR_NOT_ENOUGH_INTERFACES] , configtypecards[choise], found);
|
||||||
errorbox(message);
|
errorbox(message);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
while ( configtypecards[choise] > found);
|
|
||||||
|
|
||||||
if (rc == 0 || rc == 1)
|
if (rc == 0 || rc == 1)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user