mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
More robust method to parse phy from selected interface
This commit is contained in:
parent
ca157b1789
commit
42ff260d63
@ -12,7 +12,7 @@ if (isset($_POST['interface'])) {
|
|||||||
$flags = 0;
|
$flags = 0;
|
||||||
|
|
||||||
// get physical device for selected interface
|
// get physical device for selected interface
|
||||||
exec("iw dev | awk '/$iface/ {print line}{line = $0}'", $return);
|
exec("iw dev | awk -v iface=".$iface." '/^phy#/ { phy = $0 } $1 == \"Interface\" { interface = $2 } interface == iface { print phy }'", $return);
|
||||||
$phy = $return[0];
|
$phy = $return[0];
|
||||||
|
|
||||||
// get frequencies supported by device
|
// get frequencies supported by device
|
||||||
|
Loading…
x
Reference in New Issue
Block a user