public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Alex Koch <ipfire@starkstromkonsument.de>
To: development@lists.ipfire.org
Subject: [PATCH 1/2] zoneconf: Show real names of NICs in the WUI
Date: Tue, 03 Sep 2019 23:46:23 +0200	[thread overview]
Message-ID: <20190903214624.2280-2-ipfire@starkstromkonsument.de> (raw)
In-Reply-To: <20190903214624.2280-1-ipfire@starkstromkonsument.de>

[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]

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(a)starkstromkonsument.de>
---
 html/cgi-bin/zoneconf.cgi | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

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++;
 	}
 }
 
-- 
2.17.1


  reply	other threads:[~2019-09-03 21:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03 21:46 [PATCH 0/2] zonconf: replace the nic-names with eth... and wlan... or not? Alex Koch
2019-09-03 21:46 ` Alex Koch [this message]
2019-09-03 21:46 ` [PATCH 2/2] zoneconf: Add status output of "brctl show" and "ip addr" Alex Koch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190903214624.2280-2-ipfire@starkstromkonsument.de \
    --to=ipfire@starkstromkonsument.de \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox