mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 22:50:21 +01:00
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".
This commit is contained in:
parent
286e926ee8
commit
19d7386b2f
2 changed files with 6 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue