From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: Re: [PATCH v3 8/8] wlanap.cgi: Access db.txt in place of using regdbdump on regulatory.bin Date: Thu, 05 Aug 2021 12:55:12 +0200 Message-ID: In-Reply-To: <882d3501-5e22-4977-96e0-896dfe6b27b8@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6175716754766009955==" List-Id: --===============6175716754766009955== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Bernhard, On 05/08/2021 12:40, Bernhard Bitsch wrote: > Reviewed-by: Bernhard Bitsch > Tested-by: Bernhard Bitsch >=20 > Am 05.08.2021 um 12:21 schrieb Adolf Belka: >> - wlanap.cgi was using regdbdump from crda to create a text based list of = the >> =C2=A0=C2=A0=C2=A0 wireless settings by country database. >> - With the removal of crda as part of the removal of python2 this option c= ould not be >> =C2=A0=C2=A0=C2=A0 used. >> - wireless-regdb also has a text based database list in the source tarball= and this >> =C2=A0=C2=A0=C2=A0 patch makes wlanap.cgi read this list into the @country= list_cmd variable >> - This needs to be tested by someone that has an IPFire system with wifi t= hat can access >> =C2=A0=C2=A0=C2=A0 and evaluate wlanap.cgi to confirm that this change fun= ctions as expected. >> - This version changes the name of the stored text file from db.txt to reg= ulatorydb.txt >> - The command to read the data from regulatorydb.txt into @countrylist_cmd= has been >> =C2=A0=C2=A0=C2=A0 corrected >> >> Signed-off-by: Adolf Belka >> --- >> =C2=A0 html/cgi-bin/wlanap.cgi | 5 ++++- >> =C2=A0 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi >> index eba5fe774..3024257db 100644 >> --- a/html/cgi-bin/wlanap.cgi >> +++ b/html/cgi-bin/wlanap.cgi >> @@ -312,8 +312,11 @@ if ( $channel =3D~ /\d+/ ){push(@temp,$channel + 0);} >> =C2=A0 push(@channellist, @temp); >> =C2=A0 } >> -my @countrylist_cmd =3D `regdbdump /usr/lib/crda/regulatory.bin 2>/dev/nu= ll`; >> =C2=A0 # get available country codes >> +open(FILE, =E2=80=9C Should read: > +open(FILE, =E2=80=9C=20 > > +my @countrylist_cmd =3D ; >> +close(FILE); >> + >> =C2=A0 my @temp =3D "00"; >> =C2=A0 foreach (@countrylist_cmd){ >> --===============6175716754766009955==--