Comment 5 for bug 877752

Revision history for this message
Brendan Donegan (brendan-donegan) wrote : Re: wireless_before_suspend failed

Hi Daniel,

The logic of the test is as follows:

If checks if you *have* a wireless connection at the point of running the test with 'nmcli -f SSID,ACTIVE dev wifi list'

For you this should be 'wiberg.nu'

It then uses this to get the connection from the list of existing ones, and here's the problem - it picks up 'wiberg.nu 971ebaeb-9ce2-40c3-bc43-be5f621c33ff vpn never' as the connection to use in the test. It then knocks down all your existing connections and brings back up your 'wireless' connection (which in this case is not one).

Try:

> active_connection=$(nmcli -f SSID,ACTIVE dev wifi list | grep yes)
> ap=$(echo $active_connection | awk -F\' '{print $2}')
> conn=$(nmcli -t -f UUID,NAME con list | grep wireless | grep -e "$ap$" | awk -F\: '{print $1}')

versus:

> active_connection=$(nmcli -f SSID,ACTIVE dev wifi list | grep yes)
> ap=$(echo $active_connection | awk -F\' '{print $2}')
> conn=$(nmcli -t -f UUID,NAME con list | grep -e "$ap$" | awk -F\: '{print $1}')

If it's ok to change the 'wiberg.nu' connection name to something like 'wibergvpn' then this will let the test run. In the meanwhile please check the modified code and let me know if it works.