Interface hooks¶
Interface hooks are run with the “start” argument after an interface is added and with the “stop” argument before it is removed.
Hook locations:
/etc/bonding/interface.d/all: hooks to be run for all interfaces/etc/bonding/interface.d/<interface ID>: hooks for individual interfaces/etc/bonding/interface.d/default: hooks for legs with no individual hook folder
An example leg hook is available at
/usr/share/doc/bonding/examples/interface-hook.
Environment variables¶
Interface hooks are run with the following environment variables:
ID: the interface ID
INTERFACE: the raw interface including VLAN (i.e. eth3 or eth3.3)
INTERFACE_BASE: the raw interface excluding any VLAN
INTERFACE_MAC: the MAC of the interface raw, if specified
INTERFACE_MTU: the MTU of the interface, if specified
INTERFACE_MODE: the Ethernet mode of the interface