mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
setup: add nic identify function.
This commit is contained in:
@@ -591,4 +591,10 @@ char *de_tr[] = {
|
||||
"Beim Herunterladen ist ein Fehler aufgetreten!",
|
||||
/* TR_DHCP_FORCE_MTU */
|
||||
"DHCP MTU setzen:",
|
||||
/* TR_IDENTIFY */
|
||||
"Identifizieren",
|
||||
/* TR_IDENTIFY_SHOULD_BLINK */
|
||||
"Die Leds dieses Netzwerkports sollten jetzt blinken ...",
|
||||
/* TR_IDENTIFY_NOT_SUPPORTED */
|
||||
"Dieser Netzwerkport untestützt die Funktion leider nicht.",
|
||||
};
|
||||
|
||||
@@ -587,4 +587,10 @@ char *en_tr[] = {
|
||||
"Error while downloading!",
|
||||
/* TR_DHCP_FORCE_MTU */
|
||||
"Force DHCP mtu:",
|
||||
/* TR_IDENTIFY */
|
||||
"Identify",
|
||||
/* TR_IDENTIFY_SHOULD_BLINK */
|
||||
"Selected port should blink now ...",
|
||||
/* TR_IDENTIFY_NOT_SUPPORTED */
|
||||
"Function is not supported by this port.",
|
||||
};
|
||||
|
||||
@@ -583,4 +583,10 @@ char *es_tr[] = {
|
||||
"Error while downloading!",
|
||||
/* TR_DHCP_FORCE_MTU */
|
||||
"Force DHCP mtu:",
|
||||
/* TR_IDENTIFY */
|
||||
"Identify",
|
||||
/* TR_IDENTIFY_SHOULD_BLINK */
|
||||
"Selected port should blink now ...",
|
||||
/* TR_IDENTIFY_NOT_SUPPORTED */
|
||||
"Function is not supported by this port.",
|
||||
};
|
||||
|
||||
@@ -583,4 +583,10 @@ char *fr_tr[] = {
|
||||
"Erreur pendant le téléchargement!",
|
||||
/* TR_DHCP_FORCE_MTU */
|
||||
"Force DHCP mtu:",
|
||||
/* TR_IDENTIFY */
|
||||
"Identify",
|
||||
/* TR_IDENTIFY_SHOULD_BLINK */
|
||||
"Selected port should blink now ...",
|
||||
/* TR_IDENTIFY_NOT_SUPPORTED */
|
||||
"Function is not supported by this port.",
|
||||
};
|
||||
|
||||
@@ -587,4 +587,10 @@ char *nl_tr[] = {
|
||||
"Fout tijdens downloaden!",
|
||||
/* TR_DHCP_FORCE_MTU */
|
||||
"Forceer DHCP mtu:",
|
||||
/* TR_IDENTIFY */
|
||||
"Identify",
|
||||
/* TR_IDENTIFY_SHOULD_BLINK */
|
||||
"Selected port should blink now ...",
|
||||
/* TR_IDENTIFY_NOT_SUPPORTED */
|
||||
"Function is not supported by this port.",
|
||||
};
|
||||
|
||||
@@ -583,4 +583,10 @@ char *pl_tr[] = {
|
||||
"Błąd podczas pobierania!",
|
||||
/* TR_DHCP_FORCE_MTU */
|
||||
"Wymuś mtu DHCP:",
|
||||
/* TR_IDENTIFY */
|
||||
"Identify",
|
||||
/* TR_IDENTIFY_SHOULD_BLINK */
|
||||
"Selected port should blink now ...",
|
||||
/* TR_IDENTIFY_NOT_SUPPORTED */
|
||||
"Function is not supported by this port.",
|
||||
};
|
||||
|
||||
@@ -581,4 +581,10 @@ char *ru_tr[] = {
|
||||
"Во время загрузки произошла ошибка!",
|
||||
/* TR_DHCP_FORCE_MTU */
|
||||
"Форсировать DHCP mtu:",
|
||||
/* TR_IDENTIFY */
|
||||
"Identify",
|
||||
/* TR_IDENTIFY_SHOULD_BLINK */
|
||||
"Selected port should blink now ...",
|
||||
/* TR_IDENTIFY_NOT_SUPPORTED */
|
||||
"Function is not supported by this port.",
|
||||
};
|
||||
|
||||
@@ -587,4 +587,10 @@ char *tr_tr[] = {
|
||||
"İndirirken hata!",
|
||||
/* TR_DHCP_FORCE_MTU */
|
||||
"DHCP mtu zorla:",
|
||||
/* TR_IDENTIFY */
|
||||
"Identify",
|
||||
/* TR_IDENTIFY_SHOULD_BLINK */
|
||||
"Selected port should blink now ...",
|
||||
/* TR_IDENTIFY_NOT_SUPPORTED */
|
||||
"Function is not supported by this port.",
|
||||
};
|
||||
|
||||
@@ -615,6 +615,7 @@ int nicmenu(int colour)
|
||||
int rc, choise = 0, count = 0, kcount = 0, mcount = 0, i, j, nic_in_use;
|
||||
int found_NIC_as_Card[4];
|
||||
char message[STRING_SIZE];
|
||||
char temp[STRING_SIZE];
|
||||
|
||||
char cMenuInhalt[STRING_SIZE];
|
||||
char MenuInhalt[20][180];
|
||||
@@ -657,8 +658,20 @@ int nicmenu(int colour)
|
||||
pMenuInhalt[mcount] = NULL;
|
||||
|
||||
sprintf(message, ctr[TR_CHOOSE_NETCARD], ucolourcard[colour]);
|
||||
rc = newtWinMenu( ctr[TR_NETCARDMENU2], message, 50, 5, 5, 6, pMenuInhalt, &choise, ctr[TR_OK], ctr[TR_SELECT], ctr[TR_CANCEL], NULL);
|
||||
|
||||
rc=2;
|
||||
while ( rc == 2 ) {
|
||||
rc = newtWinMenu( ctr[TR_NETCARDMENU2], message, 50, 5, 5, 6, pMenuInhalt, &choise, ctr[TR_SELECT], ctr[TR_IDENTIFY], ctr[TR_CANCEL], NULL);
|
||||
if ( rc == 2 ) {
|
||||
sprintf(temp, "/sbin/ip link set %s up", nics[found_NIC_as_Card[choise]].nic);
|
||||
mysystem(temp);
|
||||
sprintf(temp, "/usr/sbin/ethtool -p %s 10", nics[found_NIC_as_Card[choise]].nic);
|
||||
if (runcommandwithstatus(temp,ctr[TR_IDENTIFY_SHOULD_BLINK]) != 0) {
|
||||
errorbox(ctr[TR_IDENTIFY_NOT_SUPPORTED]);
|
||||
sprintf(temp, "/sbin/ip link set %s down", nics[found_NIC_as_Card[choise]].nic);
|
||||
mysystem(temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( rc == 0 || rc == 1) {
|
||||
write_configs_netudev(found_NIC_as_Card[choise], colour);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user