mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 19:10:31 +01:00
cli: fix quitting nmcli on 'nmcli con up'
We should also quit on 'DEACTIVATED' state' when monitoring active connection state. Reproducer: nmcli con add con-name myvlan dev eth1 id 88 nmcli -p con up myvlan
This commit is contained in:
parent
3eac01256c
commit
f8c8d67e93
1 changed files with 2 additions and 1 deletions
|
|
@ -1282,7 +1282,8 @@ active_connection_state_cb (NMActiveConnection *active, GParamSpec *pspec, gpoin
|
|||
nm_object_get_path (NM_OBJECT (active)));
|
||||
}
|
||||
quit ();
|
||||
} else if (state == NM_ACTIVE_CONNECTION_STATE_UNKNOWN) {
|
||||
} else if ( state == NM_ACTIVE_CONNECTION_STATE_DEACTIVATED
|
||||
|| state == NM_ACTIVE_CONNECTION_STATE_UNKNOWN) {
|
||||
g_string_printf (nmc->return_text, _("Error: Connection activation failed."));
|
||||
nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION;
|
||||
quit ();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue