File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -269,13 +269,17 @@ function setKnownStationsWPA($networks)
269269 if (!networkExists ($ ssid , $ wpaCliNetworks )) {
270270 $ ssid = escapeshellarg ('" ' .$ network ['ssid ' ].'" ' );
271271 $ psk = escapeshellarg ('" ' .$ network ['passphrase ' ].'" ' );
272+ $ protocol = $ network ['protocol ' ];
272273 $ netid = trim (shell_exec ("sudo wpa_cli -i $ iface add_network " ));
273274 if (isset ($ netid ) && !isset ($ known [$ netid ])) {
274275 $ commands = [
275276 "sudo wpa_cli -i $ iface set_network $ netid ssid $ ssid " ,
276277 "sudo wpa_cli -i $ iface set_network $ netid psk $ psk " ,
277278 "sudo wpa_cli -i $ iface enable_network $ netid "
278279 ];
280+ if ($ protocol === 'Open ' ) {
281+ $ commands [1 ] = "sudo wpa_cli -i $ iface set_network $ netid key_mgmt NONE " ;
282+ }
279283 foreach ($ commands as $ cmd ) {
280284 exec ($ cmd );
281285 usleep (1000 );
You can’t perform that action at this time.
0 commit comments