From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Koch 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 Message-ID: <20190903214624.2280-2-ipfire@starkstromkonsument.de> In-Reply-To: <20190903214624.2280-1-ipfire@starkstromkonsument.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6959105476457695210==" List-Id: --===============6959105476457695210== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 th= e real names. Signed-off-by: Alex Koch --- 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); =20 @nics =3D sort {$a->[0] cmp $b->[0]} @nics; # Sort nics by their MAC address =20 -# Name the physical NICs -# Even though they may not be really named like this, we will name them ethX= or wlanX -my $ethcount =3D 0; -my $wlancount =3D 0; - foreach (@nics) { my $nic =3D $_->[1]; =20 + # Test if NIC is a wireless interface to disable VLAN-Option in Dropdown if (-e "/sys/class/net/$nic/wireless") { - $_->[1] =3D "wlan$wlancount"; $_->[2] =3D 1; - $wlancount++; - } else { - $_->[1] =3D "eth$ethcount"; - $ethcount++; } } =20 --=20 2.17.1 --===============6959105476457695210==--