]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/wlanap.cgi
kernel: update to 6.6.32
[ipfire-2.x.git] / html / cgi-bin / wlanap.cgi
index 85fe42d965a078add3a5cbed6a61fa7202e7929a..c2a5605fca1d32d0518cea384cd0988fbea00e29 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2014  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2021  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -148,16 +148,16 @@ if ( $wlanapsettings{'ACTION'} eq "$Lang::tr{'save'}" ){
                &General::writehash("/var/ipfire/wlanap/settings", \%wlanapsettings);
                &WriteConfig_hostapd();
 
-               system("/usr/local/bin/wlanapctrl restart >/dev/null 2>&1");
+               &General::system("/usr/local/bin/wlanapctrl", "restart");
                pid();
        }
 }elsif ( $wlanapsettings{'ACTION'} eq "$Lang::tr{'wlanap interface'}" ){
        &General::writehash("/var/ipfire/wlanap/settings", \%wlanapsettings);
 }elsif ( ($wlanapsettings{'ACTION'} eq "$Lang::tr{'start'}") && ($memory == 0) ){
-       system("/usr/local/bin/wlanapctrl start >/dev/null 2>&1");
+       &General::system("/usr/local/bin/wlanapctrl", "start");
        pid();
 }elsif ( $wlanapsettings{'ACTION'} eq "$Lang::tr{'stop'}" ){
-       system("/usr/local/bin/wlanapctrl stop >/dev/null 2>&1");
+       &General::system("/usr/local/bin/wlanapctrl", "stop");
        $memory=0;
 }
 
@@ -312,8 +312,11 @@ if ( $channel =~ /\d+/ ){push(@temp,$channel + 0);}
 push(@channellist, @temp);
 }
 
-my @countrylist_cmd = `regdbdump /usr/lib/crda/regulatory.bin 2>/dev/null`;
 # get available country codes
+open(FILE, "</lib/firmware/regulatorydb.txt");
+my @countrylist_cmd = <FILE>;
+close(FILE);
+
 
 my @temp = "00";
 foreach (@countrylist_cmd){
@@ -571,17 +574,7 @@ for (my $i=0;$i<$#txpower_cmd;$i=$i+2){
        print "<tr><td $col>@txpower_cmd[$i]</td></tr>";
        $count++;
 }
-print "</table><br>";
-print <<END
-<br />
-<table width='80%' cellspacing='0' class='tbl' border='0'>
-<tr><td bgcolor='$color{'color20'}' align='left'><strong>$Lang::tr{'wlan clients'}</strong></td></tr>
-<tr><td>&nbsp;<a href="/cgi-bin/wireless.cgi">$Lang::tr{'wlanap link wireless'}</a></td></tr>
-<tr><td>&nbsp;<a href="/cgi-bin/dhcp.cgi">$Lang::tr{'wlanap link dhcp'}</a></td></tr>
-<tr><td><br></td></tr>
-</table>
-END
-;
+print "</table>";
 &Header::closebox();
 print "</form>";
 &Header::closebigbox();