diff options
author | Jonathan Cave <jonathan.cave@canonical.com> | 2021-04-19 17:55:10 +0100 |
---|---|---|
committer | Jonathan Cave <jonathan.cave@canonical.com> | 2021-04-21 18:03:45 +0100 |
commit | 4bde6de031ee65f9ea633f59e5d4a177bb0dcacd (patch) | |
tree | 5aa8aba270d63a37440c7d4501a0167b6b072229 /bin | |
parent | 7191e3b08c1ccfa30d6bde66a6210088afc320f1 (diff) |
Fix: support nmcli AP settings names in focal
The names of certain wifi settings used in Access Point mode have changed in network-manager version used in focal and later.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/wifi_nmcli_test.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/bin/wifi_nmcli_test.py b/bin/wifi_nmcli_test.py index 6f77376..e2c0a52 100755 --- a/bin/wifi_nmcli_test.py +++ b/bin/wifi_nmcli_test.py @@ -264,17 +264,12 @@ def hotspot(args): if retcode != 0: print("Set band failed\n") return retcode - cmd = "nmcli c modify TEST_CON wifi-sec.key-mgmt wpa-psk" + cmd = ("nmcli c modify TEST_CON wifi-sec.key-mgmt wpa-psk " + "wifi-sec.psk \"ubuntu1234\"") print_cmd(cmd) retcode = sp.call(cmd, shell=True) if retcode != 0: - print("Set key-mgmt failed\n") - return retcode - cmd = "nmcli connection modify TEST_CON wifi-sec.psk \"ubuntu1234\"" - print_cmd(cmd) - retcode = sp.call(cmd, shell=True) - if retcode != 0: - print("Set PSK failed\n") + print("Setting up wifi security failed\n") return retcode cmd = "nmcli connection up TEST_CON" print_cmd(cmd) |