From a20db9185badc01565484b11d8fa75408e5ffd8a Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 30 Apr 2020 12:42:31 +0100 Subject: [PATCH] Fix wifi client connect button. Resolves #572, thx @zbchristian --- includes/configure_client.php | 3 ++- installers/raspap.sudoers | 2 +- templates/wifi_stations.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/configure_client.php b/includes/configure_client.php index 37aabd91..4e0b001f 100755 --- a/includes/configure_client.php +++ b/includes/configure_client.php @@ -16,7 +16,8 @@ function DisplayWPAConfig() if (isset($_POST['connect'])) { $result = 0; - exec('sudo wpa_cli -i ' . RASPI_WPA_CTRL_INTERFACE . ' select_network '.strval($_POST['connect'])); + exec('sudo wpa_cli -i ' . RASPI_WIFI_CLIENT_INTERFACE . ' select_network '.strval($_POST['connect'])); + $status->addMessage('New network selected', 'success'); } elseif (isset($_POST['client_settings'])) { $tmp_networks = $networks; if ($wpa_file = fopen('/tmp/wifidata', 'w')) { diff --git a/installers/raspap.sudoers b/installers/raspap.sudoers index 517fbdef..4d40eaa9 100644 --- a/installers/raspap.sudoers +++ b/installers/raspap.sudoers @@ -7,7 +7,7 @@ www-data ALL=(ALL) NOPASSWD:/bin/cp /tmp/wifidata /etc/wpa_supplicant/wpa_suppli www-data ALL=(ALL) NOPASSWD:/sbin/wpa_cli -i wlan[0-9] scan_results www-data ALL=(ALL) NOPASSWD:/sbin/wpa_cli -i wlan[0-9] scan www-data ALL=(ALL) NOPASSWD:/sbin/wpa_cli -i wlan[0-9] reconfigure -www-data ALL=(ALL) NOPASSWD:/sbin/wpa_cli -i wlan[0-9] select_network +www-data ALL=(ALL) NOPASSWD:/sbin/wpa_cli -i wlan[0-9] select_network [0-9]* www-data ALL=(ALL) NOPASSWD:/bin/cp /tmp/hostapddata /etc/hostapd/hostapd.conf www-data ALL=(ALL) NOPASSWD:/bin/systemctl start hostapd.service www-data ALL=(ALL) NOPASSWD:/bin/systemctl stop hostapd.service diff --git a/templates/wifi_stations.php b/templates/wifi_stations.php index 071b5331..1769cc9e 100755 --- a/templates/wifi_stations.php +++ b/templates/wifi_stations.php @@ -78,7 +78,7 @@
" id="update" name="update" /> - + " id="update" name="update" />