[1/2] zoneconf: Show real names of NICs in the WUI

Message ID 20190903214624.2280-2-ipfire@starkstromkonsument.de
State New
Headers show
Series zonconf: replace the nic-names with eth... and wlan... or not? | expand

Commit Message

Alexander Koch Sept. 3, 2019, 9:46 p.m. UTC
Currently the real names of all NICs are changed to ethX and wlanX in the WUI. This is confusing, because command line tools like ip or brctl print out the real names.

Signed-off-by: Alex Koch <ipfire@starkstromkonsument.de>
---
 html/cgi-bin/zoneconf.cgi | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

Patch

diff --git a/html/cgi-bin/zoneconf.cgi b/html/cgi-bin/zoneconf.cgi
index 6b8642818..bb24347df 100644
--- a/html/cgi-bin/zoneconf.cgi
+++ b/html/cgi-bin/zoneconf.cgi
@@ -144,21 +144,12 @@  closedir($dh);
 
 @nics = sort {$a->[0] cmp $b->[0]} @nics; # Sort nics by their MAC address
 
-# Name the physical NICs
-# Even though they may not be really named like this, we will name them ethX or wlanX
-my $ethcount = 0;
-my $wlancount = 0;
-
 foreach (@nics) {
 	my $nic = $_->[1];
 
+	# Test if NIC is a wireless interface to disable VLAN-Option in Dropdown
 	if (-e "/sys/class/net/$nic/wireless") {
-		$_->[1] = "wlan$wlancount";
 		$_->[2] = 1;
-		$wlancount++;
-	} else {
-		$_->[1] = "eth$ethcount";
-		$ethcount++;
 	}
 }