Commit 3983919a authored by Franco Fichtner's avatar Franco Fichtner

interfaces: slurp wlan devices into available devs

This is required for FreeBSD 11.0.
parent ae4e38bc
......@@ -28,9 +28,16 @@
function legacy_interface_listget($flag = '')
{
$cmd_wlan = 'sysctl -n net.wlan.devices';
$cmd = '/sbin/ifconfig -l';
$ifs_wlan = null;
$ifs = null;
exec($cmd_wlan . ' 2>&1', $out_wlan, $ret_wlan);
if (!$ret_wlan && isset($out_wlan[0])) {
$ifs_wlan = explode(' ', $out_wlan[0]);
}
if ($flag === 'up') {
$cmd .= 'u';
} else if ($flag === 'down') {
......@@ -47,6 +54,10 @@ function legacy_interface_listget($flag = '')
$ifs = explode(' ', $out[0]);
}
if ($ifs_wlan != null) {
$ifs = array_merge($ifs, $ifs_wlan);
}
return ($ifs);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment