Commit 19d7386b authored by Dan Williams's avatar Dan Williams

dispatcher: add PRE_UP states

This event runs before a connection/device is announced as
"activated" or "connected", to enable scripts to do things
before applications begin using connectivity.  For example,
this could be used to manage /etc/resolv.conf outside of
NetworkManager and ensure that resolv.conf had correct
information before DNS is used.

Note that this is different than the Debian or Gentoo "pre-up"
event used in /etc/network/interfaces, as that event runs before
any L2 configuration has started.  If we really need an event
like that, we'll add it later as "lower-up".
parent 286e926e
......@@ -276,12 +276,16 @@ action_to_string (DispatcherAction action)
switch (action) {
case DISPATCHER_ACTION_HOSTNAME:
return "hostname";
case DISPATCHER_ACTION_PRE_UP:
return "pre-up";
case DISPATCHER_ACTION_UP:
return "up";
case DISPATCHER_ACTION_PRE_DOWN:
return "pre-down";
case DISPATCHER_ACTION_DOWN:
return "down";
case DISPATCHER_ACTION_VPN_PRE_UP:
return "vpn-pre-up";
case DISPATCHER_ACTION_VPN_UP:
return "vpn-up";
case DISPATCHER_ACTION_VPN_PRE_DOWN:
......
......@@ -32,9 +32,11 @@
typedef enum {
DISPATCHER_ACTION_HOSTNAME,
DISPATCHER_ACTION_PRE_UP,
DISPATCHER_ACTION_UP,
DISPATCHER_ACTION_PRE_DOWN,
DISPATCHER_ACTION_DOWN,
DISPATCHER_ACTION_VPN_PRE_UP,
DISPATCHER_ACTION_VPN_UP,
DISPATCHER_ACTION_VPN_PRE_DOWN,
DISPATCHER_ACTION_VPN_DOWN,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment