Handbook:Parts/Networking/Extending/ru

Standard function hooks
Four functions can be defined in which will be called surrounding the start/stop operations. The functions are called with the interface name first so that one function can control multiple adapters.

The return values for the preup and predown functions should be 0 (success) to indicate that configuration or de-configuration of the interface can continue. If preup returns a non-zero value, then interface configuration will be aborted. If predown returns a non-zero value, then the interface will not be allowed to continue de-configuration.

The return values for the postup and postdown functions are ignored since there's nothing to do if they indicate failure.

${IFACE} is set to the interface being brought up/down. ${IFVAR} is ${IFACE} converted to variable name bash allows.

Wireless tools function hook
Two functions can be defined in which will be called surrounding the associate function. The functions are called with the interface name first so that one function can control multiple adapters.

The return values for the preassociate function should be 0 (success) to indicate that configuration or de-configuration of the interface can continue. If preassociate returns a non-zero value, then interface configuration will be aborted.

The return value for the postassociate function is ignored since there's nothing to do if it indicates failure.

${ESSID} is set to the exact ESSID of the AP the system is connecting to. ${ESSIDVAR} is ${ESSID} converted to a variable name bash allows.