diff --git a/NEWS b/NEWS index 246ea48bd6..3852f618fa 100644 --- a/NEWS +++ b/NEWS @@ -47,6 +47,7 @@ Notable changes include: The following features were backported to 1.10.x releases from 1.10.0 to 1.10.10 are also present in NetworkManager-1.12: +* Set NM_DISPATCHER_ACTION environment variable in dispatcher scripts. * Fix crash during reapply of connection settings * Fix connectivity timeout handling (bgo #794464), * Retry activating devices when the parent becomes managed (rh #1553595), diff --git a/dispatcher/nm-dispatcher-utils.c b/dispatcher/nm-dispatcher-utils.c index 362f31264e..4d04eeca97 100644 --- a/dispatcher/nm-dispatcher-utils.c +++ b/dispatcher/nm-dispatcher-utils.c @@ -575,6 +575,8 @@ done: _items_add_key0 (items, NULL, "PATH", g_getenv ("PATH")); + _items_add_key (items, NULL, "NM_DISPATCHER_ACTION", action); + *out_error_message = NULL; g_ptr_array_add (items, NULL); return (char **) g_ptr_array_free (g_steal_pointer (&items), FALSE); diff --git a/man/NetworkManager.xml b/man/NetworkManager.xml index 0ec6b0aee9..7b0513bb92 100644 --- a/man/NetworkManager.xml +++ b/man/NetworkManager.xml @@ -181,6 +181,13 @@ The environment contains more information about the interface and the connection. The following variables are available for the use in the dispatcher scripts: + + NM_DISPATCHER_ACTION + + The dispatcher action like "up" or "dhcp4-change", identical to the first + command line argument. Since NetworkManager 1.12.0. + + CONNECTION_UUID