Handbook Talk:AMD64/Networking/Extending
Factoring out Notes re net.example.bz2
Could both instances of the Note template referencing net.example.bz2 be removed and instead be replaced by a single instance at the beginning of the page?
-- Flexibeast (talk) 05:10, 27 September 2024 (UTC)
Suggested phrasing changes
"Standard function hooks" section
Four functions can be defined in /etc/conf.d/net:
preup()
, called before an interface is brought up;predown()
, called before an interface is brought down;postup()
, called after an interface is brought up; andpostdown()
, called after an interface is brought down.
Each of these these functions is called with the interface name, available within each function via the IFACE variable, so that one function can control multiple interfaces.
The return values for the preup()
and predown()
functions should be:
- 0 to indicate success, and that configuration or de-configuration of the interface can continue.
- A non-zero value otherwise.
If preup()
returns a non-zero value, interface configuration will be aborted. If predown()
returns a non-zero value, the interface will not be allowed to continue de-configuration.
postup()
and postdown()
functions are ignored since there's nothing to do if they indicate failure.It's not clear to me what's meant by "${IFVAR} is ${IFACE} converted to variable name bash allows."
"Wireless tools function hook" section
Rename section to "Wireless function hooks".
Two functions can be defined in /etc/conf.d/net:
preassociate()
, called before association.postassociate()
, called after association.
Each of these these functions is called with the interface name, available within each function via the IFACE variable, so that one function can control multiple interfaces.
The return values for the preassociate() function should be:
- 0 to indicate success, and to continue configuration.
- A non-zero value otherwise.
If preassociate()
returns a non-zero value, interface configuration will be aborted.
The return value for the postassociate()
function is ignored since there's nothing to do if it indicates failure.
Again, it's not clear to me what is meant by "${ESSIDVAR} is ${ESSID} converted to a variable name bash allows."
Even though this section duplicates information contained in the previous section, my feeling is that it's best not to factor that information out, since readers might open the page at this section without having read the previous section.
- Thanks! Added in Special:Diff/1271503/1315929
- --csfore (talk) 18:51, 13 October 2024 (UTC)