mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Return wpa_cli failure in status message
This commit is contained in:
parent
0cb3128158
commit
20589bacf3
@ -18,8 +18,12 @@ function DisplayWPAConfig()
|
||||
$result = 0;
|
||||
$iface = escapeshellarg($_SESSION['wifi_client_interface']);
|
||||
$netid = intval($_POST['connect']);
|
||||
exec('sudo wpa_cli -i ' . $iface . ' select_network ' . $netid);
|
||||
$status->addMessage('New network selected', 'success');
|
||||
$return = shell_exec('sudo wpa_cli -i ' .$iface. ' select_network ' . $netid);
|
||||
if (trim($return) == "FAIL") {
|
||||
$status->addMessage('WPA command line client returned failure. Check your adapter.', 'danger');
|
||||
} else {
|
||||
$status->addMessage('New network selected', 'success');
|
||||
}
|
||||
} elseif (isset($_POST['wpa_reinit'])) {
|
||||
$status->addMessage('Reinitializing wpa_supplicant', 'info', false);
|
||||
$force_remove = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user