:: Re: [DNG] ascii an waiting for dhcp…
Top Pagina
Delete this message
Reply to this message
Auteur: Didier Kryn
Datum:  
Aan: dng
Onderwerp: Re: [DNG] ascii an waiting for dhcp on boot
Le 07/12/2017 à 17:21, Dr. Nikolaus Klepp a écrit :
> Am Mittwoch, 6. Dezember 2017 schrieb KatolaZ:
>> 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
>>
>>
> Just saw a typo in my mail: the file is "/lib/udev/ifupdown-hotplug" (not "/lib/udev/ifupdown-hotplug-original").
>
> nik

    Now it launches dhclient on eth0 right away, which incurs some
delay before it goes to background. Shorther than before, but still a delay.

    Didier