:: Re: [DNG] ifstat.eth0 on Boot
Top Page
Delete this message
Reply to this message
Author: Didier Kryn
Date:  
To: dng
New-Topics: Re: [DNG] ifstat.eth0 on Boot [SOLVED]
Subject: Re: [DNG] ifstat.eth0 on Boot
Le 07/12/2018 à 12:45, Michael K. a écrit :
> ¡Ola!
>
> After a Dev1 Setup on a Laptop (whit eth0), i have to wait a long time
> for the eth0 on "cold boot".
>
> I "cold boot" my Laptop
> I look to the "Boot Messages"
> I see the following Msg:
>
> Configuring Network Interfaces ifup: Waiting for Lock on
> /run/network/ifstat.eth0
>
> After 2 or 3 minutes to wait, the Laptop boot up,
>
> In the folder /run/network/ i have - after the "long to wait boot":
>
>     ifstat        (content: eth0=eth0 and lo=lo
>     ifstat.eth0    (content: eth0 )
>     ifstat.lo    (content: lo )
>     ifstat.lock    (content: empty )

>
> The Packet: ifstat (1.1-8.1) current *not* installed!
>
> What must i do to speed up my Dev1 Boot ?!



    There is a long-lasting bug in the networking init file
(/etc/init.d/networking), introduced by Debian for Systemd
compatibility. It shows up and delays init when you have an ethernet
interface which isn't connected. I suggest you apply the attached patch
to this file. In addition, you should probably modify your interfaces
file so as to contain both 'auto eth0' and 'allow-hotplug eth0' - don't
ask me why, I don't know, but it works.

        Didier

--- networking~    2016-09-16 15:02:20.000000000 +0200
+++ networking    2017-12-18 17:25:49.902781233 +0100
@@ -112,7 +112,12 @@ ifup_hotplug () {
                 done)
         if [ -n "$ifaces" ]
         then
-        ifup $ifaces "$@" || true
+        # link detection does not work unless we up the link
+        ip link set "$iface" up || true
+        if [ "$(cat /sys/class/net/$link/operstate)" = up ]
+        then
+            echo "$iface"
+        fi
         fi
     fi
 }