setup: add nic identify function.
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 6 Oct 2013 06:59:35 +0000 (08:59 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 6 Oct 2013 07:00:17 +0000 (09:00 +0200)
langs/de/install/lang_de.c
langs/en/install/lang_en.c
langs/es/install/lang_es.c
langs/fr/install/lang_fr.c
langs/nl/install/lang_nl.c
langs/pl/install/lang_pl.c
langs/ru/install/lang_ru.c
langs/tr/install/lang_tr.c
src/install+setup/libsmooth/netstuff.c

index 85db8677d83be4cd1f240b0fa7e327099236cffa..8c935865eacf57596dc31e1f27f8b737fc962dff 100644 (file)
@@ -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.",
 };
index 87f8d2fa9158ff6a4b06d1c7d2dc973b253a1047..12ac4b5578b9509ca93fe7545ec4a4d1aa3cfa60 100644 (file)
@@ -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.",
 };
index a1808fe51f0a89ab91484bd36715fda63d7bfcaf..4a08748ccdbad94986228768e852ca1c9830d28d 100644 (file)
@@ -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.",
 };
index 03fa9be87ba6cf643e7a687a5b7b486753a3b397..188e0fd1a5afcf1f4780518cef27a336bda0a1e1 100644 (file)
@@ -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.",
 };
index b9a8ec42dd6e63858d69c6beddd48b13625cbd0b..aa0fa2f0179667be192d3cacb0f90e6795d55318 100644 (file)
@@ -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.",
 };
index eb428d5bb9d5409ba9787f1ecb6b1ac8ff3e3c20..dddf551a67604f93f30a42ecf0a97f5ae47b1a9b 100644 (file)
@@ -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.",
 };
index 1e96b6120943558f32dcd9e5155c9cfd91f03f55..40293a209c10e63e72716b235d0bf81714de22e9 100644 (file)
@@ -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.",
 };
index 3a959b7ad8fdea9560d68b39bfca5d3b7e8d9d5c..3131dd14faa1e5a3ae5a2d866654b1781b11c480 100644 (file)
@@ -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.",
 };
index de5c558c0e6091a1cb5d93194a09d70064f4aff6..1c6eb42e6ae1bffab5b608f16d777bd12c337966 100644 (file)
@@ -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);
                }