FS#35252 - [netctl] profile option AutoWired not documented

Attached to Project: Arch Linux
Opened by iTanguy (itanguy) - Monday, 13 May 2013, 19:47 GMT
Last edited by Jouke Witteveen (jouke) - Tuesday, 13 January 2015, 11:01 GMT
Task Type Feature Request
Category Arch Projects
Status Closed
Assigned To Jouke Witteveen (jouke)
Architecture All
Severity Very Low
Priority Low
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
Many options are implemented in netctl, sometimes mentionned on Wiki page or Forum threads. And sometimes, they are useful ! Still they don't seem to all appear in the man pages.
I don't know if these features are intentional (inherited from netcfg) or actual documentation bugs.

Example :
* The netctl-ifplugd uses the "AutoWired" option but it is not documented in netctl.profile nor netctl.special man pages
* By the way, netctl-ifplugd behavior is not documented either, for the "profile sorting" aspect. Apparently, it gives priority to "AutoWired" profiles, then Dhcp, then the other (static?). And as a sublevel... I don't know, I am not good enough in shell, but maybe ASCII order of the profile filenames (?). This is worth being documented.

Additional info:
* netctl 1.0-1
This task depends upon

Closed by  Jouke Witteveen (jouke)
Tuesday, 13 January 2015, 11:01 GMT
Reason for closing:  Implemented
Additional comments about closing:  9c5c435
Comment by iTanguy (itanguy) - Monday, 13 May 2013, 20:06 GMT
I think that is also the case (not documented) of the "ForceConnect" option for Ethernet connections.
Comment by Jouke Witteveen (jouke) - Tuesday, 14 May 2013, 11:28 GMT
Since ifplugd should eventually be replaced by something better, I am not planning on investing a lot of time in it. Patches are welcome.

As for the ForceConnect option, this applies to all profiles and suppresses the is-down and is-up checks on the interface when starting/stopping a profile. If you need it, you are almost certainly doing something wrong. That is why I did not include them in the documentation. I intended to document the option when a use case comes up.
Comment by iTanguy (itanguy) - Tuesday, 14 May 2013, 12:09 GMT
Thansk for your analysis.

For curiosity, what's wrong with ifplugd ?

Anyway, allowing to order the potential profiles that can by used by netctl-ifplugd is a nice feature. I see the use of AutoWired and Dhcp a bit limited though. Perhaps you could extend to Wired connection the "Priority" option already defined for Wireless connections ? (I didn't have a look at its implementation though).

For the ForceConnect, I understand what you mean (though it is apparently used by netctl-ifplugd in the netctl.action script). Still, I think that it can useful; many program have a "force" option that sometimes help, even simply to invetigate bugs (or as a temporary workarround with a bug in the driver). I have seen it mentionned a few times in forums, and I am not sure that it always was for "people doing womething wrong".
Comment by Jouke Witteveen (jouke) - Friday, 17 May 2013, 19:42 GMT
ifplugd is written by the same guy as systemd, but doesn't follow systemd's principles, especially as it comes to the way it daemonizes. This is one sign of the fact that it is not really maintained, another being the time since the last contribution to its source. I believe this was even made official somewhere. In the future, similar functionality might come to udev, which is now integrated in the systemd ecosystem.

Implementing a preference ordering for netctl-ifplugd is fine by me (just propose a patch), but I don't think it is wise to reuse the 'Priority' variable, as it is actually wpa_supplicant specific.

'ForceConnect' is indeed used internally for technical reasons. I have not seen any sane use of it as a configuration option yet. All I have seen was people doing things wrong :-).
Comment by iTanguy (itanguy) - Saturday, 25 May 2013, 14:13 GMT
Hi,

Attached is a patch proposal to add a Rank option in profiles and to use it to sort profiles to be used by ifplugd.action.

I can't pretend being a good dvvelopper, especially in bash, so please report any error or possible improvement. Also, I don't know how far it sticks to netctl's developement standards.
Comment by iTanguy (itanguy) - Sunday, 26 May 2013, 07:11 GMT
Note that have kept the AutoWired option for now, but it can easily be removed.

By the way, I think that netctl also lacks an option similar to ExcludeAuto (use to explicitely exclude wireless profiles from netctl-auto).

Loading...