On Wed, Dec 06, 2017 at 02:09:45PM +0100, Dr. Nikolaus Klepp wrote:
[cut]
> >
> > No bright ideas for how you'd check for that though, but it probably
> > involves poking around in /sys/class/net/$IFACE/.
> >
> > Hope this helps,
>
> definitly :-)
>
> Apply this patch to /lib/udev/ifupdown-hotplug-original. It changes line 78 from
>
> exec ifup --allow=hotplug $INTERFACE
>
> to
>
> if [ -z "${INTERFACE##eth[0-9]*}" ]; then
> if [ $(cat /sys/class/net/$INTERFACE/carrier) -eq 1 ]; then
> exec ifup --allow=hotplug $INTERFACE
> fi
> else
> exec ifup --allow=hotplug $INTERFACE
> fi
>
>
> Which hopefully brings up eth[0-9]* if the cable is plugged in. Most likely it would be a speed improvement if the lines "exec ifup --allow=hotplug $INTERFACE" are changed to "exec ifup --allow=hotplug $INTERFACE &", but this works for me. It won't work if your eth is not called eth[0-9]* :-)
>
> Nik
>
>
Hey guys,
please test the patch, as extensively as possible, and then we will
figure out a way of including it in ascii, maybe without having to
fork the corresponding package.
HND
KatolaZ
--
[ ~.,_ Enzo Nicosia aka KatolaZ - Devuan -- Freaknet Medialab ]
[ "+. katolaz [at] freaknet.org --- katolaz [at] yahoo.it ]
[ @) http://kalos.mine.nu --- Devuan GNU + Linux User ]
[ @@) http://maths.qmul.ac.uk/~vnicosia -- GPG: 0B5F062F ]
[ (@@@) Twitter: @KatolaZ - skype: katolaz -- github: KatolaZ ]