From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: Re: [PATCH v2 8/8] wlanap.cgi: Access db.txt in place of using regdbdump on regulatory.bin Date: Wed, 04 Aug 2021 19:04:08 +0200 Message-ID: <6dde2305-11e5-64e4-3fef-8cbd1fc73649@ipfire.org> In-Reply-To: <6C8C32E5-F7BE-4A54-8D9F-A70B6855DE20@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5724101112955620045==" List-Id: --===============5724101112955620045== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Michael, On 04/08/2021 16:32, Michael Tremer wrote: > Hello, >=20 >> On 28 Jul 2021, at 19:29, Adolf Belka wrote: >> >> - wlanap.cgi was using regdbdump from crda to create a text based list of = the >> wireless settings by country database. >> - With the removal of crda as part of the removal of python2 this option c= ould not be >> used. >> - wireless-regdb also has a text based database list in the source tarball= and this >> patch makes wlanap.cgi read this list into the @countrylist_cmd variable >> - This needs to be tested by someone that has an IPFire system with wifi t= hat can access >> and evaluate wlanap.cgi to confirm that this change functions as expect= ed. >> >> Signed-off-by: Adolf Belka >> --- >> html/cgi-bin/wlanap.cgi | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi >> index eba5fe774..6954eb4f0 100644 >> --- a/html/cgi-bin/wlanap.cgi >> +++ b/html/cgi-bin/wlanap.cgi >> @@ -312,7 +312,7 @@ if ( $channel =3D~ /\d+/ ){push(@temp,$channel + 0);} >> push(@channellist, @temp); >> } >> >> -my @countrylist_cmd =3D `regdbdump /usr/lib/crda/regulatory.bin 2>/dev/nu= ll`; >> +my @countrylist_cmd =3D `/lib/firmware/db.txt`; >=20 > This will try to execute the text file. This shows my lack of perl knowledge. I just didn't think of the file being a= ccessed a different way, although once you highlight it, it is very obvious. >=20 > What you want is probably something like: >=20 > open(FILE, =E2=80=9C my @countrylist_cmd =3D ; > close(FILE); I will do a v3 patch set and also change the db.txt name as you mentioned in = patch 7 of this set. Regards, Adolf. >=20 >> # get available country codes >> >> my @temp =3D "00"; >> --=20 >> 2.32.0 >> >=20 --===============5724101112955620045==--