FS#21755 - [netcfg] allow to disable ethernet link detection (NO CARRIER)
Attached to Project:
Arch Linux
Opened by Ciriaco Garcia de Celis (cgarcia) - Saturday, 20 November 2010, 10:33 GMT
Last edited by Andrea Scarpino (BaSh) - Saturday, 22 January 2011, 09:57 GMT
Opened by Ciriaco Garcia de Celis (cgarcia) - Saturday, 20 November 2010, 10:33 GMT
Last edited by Andrea Scarpino (BaSh) - Saturday, 22 January 2011, 09:57 GMT
|
Details
I started using net-auto-wired simply to help connecting two
computers (with a crossover cable): if one booted while the
other was still powered down, the eth0 link detection done
by netcfg caused it to reject the interface configuration
during boot, making it necessary to manually run it
later.
I would suggest to add a flag in order to skip the link detection which in fact is not done by other linux distros (a wired interface can be configured even with the cable not yet connected). Simply, allow to optionally skip the "NO CARRIER" test (the CARRIER_TIMEOUT wait performed in /usr/lib/network/connections/ethernet script). Done that way ifplugd would not be required in many use cases. |
This task depends upon
Closed by Andrea Scarpino (BaSh)
Saturday, 22 January 2011, 09:57 GMT
Reason for closing: Implemented
Additional comments about closing: http://projects.archlinux.org/netcfg.git /commit/?id=56faa91bae6523b587effeef964b c5e34927064e
Saturday, 22 January 2011, 09:57 GMT
Reason for closing: Implemented
Additional comments about closing: http://projects.archlinux.org/netcfg.git /commit/?id=56faa91bae6523b587effeef964b c5e34927064e
fgrep()
{
[ "$2" = "NO-CARRIER" ] && return 1 || /bin/fgrep $@
}
This "overloads" the system fgrep command (when run from netcfg) to not match the NO-CARRIER string. This works because network profiles are in fact scripts. But this is just nasty :-)