:: Re: [DNG] ascii an waiting for dhcp…
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Dr. Nikolaus Klepp
日付:  
To: dng
題目: Re: [DNG] ascii an waiting for dhcp on boot
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


--
Please do not email me anything that you are not comfortable also sharing with the NSA, CIA ...