Handbook Talk:AMD64/Networking/Extending

From Gentoo Wiki
Jump to:navigation Jump to:search

Factoring out Notes re net.example.bz2

Talk status
This discussion is still ongoing as of 2024-09-27.

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

Talk status
This discussion is done as of 2024-10-13.

"Standard function hooks" section

Proposed changes - Please make edits here until a final revision is agreed upon.

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; and
  • postdown(), 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.

Return values for the 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

Proposed changes - Please make edits here until a final revision is agreed upon.

Rename section to "Wireless function hooks".
Proposed changes - Please make edits here until a final revision is agreed upon.

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.

Within each function, the exact ESSID of the AP the system is connecting to is available via the ESSID variable.

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)