Quoting Vincent Lefevre (vinc...@vinc17.net):
> I would like to know why is eth0 up by default?
> 
> IIRC, this wasn't the case in the past, but I'm not sure.

Not knowing what you mean by the past, nor what you're running, I can
but hazard a guess. And I mean guess.

> Here are the messages related to eth0 from /var/log/messages:
> 
> Mar 17 22:00:01 xvii kernel: [    1.058264] e1000e 0000:00:19.0 eth0: (PCI 
> Express:2.5GT/s:Width x1) 00:24:e8:97:5f:73
> Mar 17 22:00:01 xvii kernel: [    1.058267] e1000e 0000:00:19.0 eth0: 
> Intel(R) PRO/1000 Network Connection
> Mar 17 22:00:01 xvii kernel: [    1.058293] e1000e 0000:00:19.0 eth0: MAC: 7, 
> PHY: 8, PBA No: 1004FF-0FF
> Mar 17 22:00:20 xvii kernel: [   85.168228] IPv6: ADDRCONF(NETDEV_UP): eth0: 
> link is not ready
> 
> and there are no eth0 occurrences in the /var/log/boot file.

I can't remember ever having modified /etc/init.d/networking but I
find I also have /etc/init.d/networking.dpkg-old. Comparing them,
there is a paragraph which was:

link=${iface##:*}
link=${link##.*}
if [ -e "/sys/class/net/$link" ] && [ "$(cat /sys/class/net/$link/operstate)" = 
up ]
then
  echo "$iface"
fi

and is now:

link=${iface##:*}
link=${link##.*}
if [ -e "/sys/class/net/$link" ]
then
  # 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

I have

$ cat
/sys/devices/pci0000\:00/0000\:00\:1c.2/0000\:09\:00.0/net/eth0/operstate 
down
$ 

and

$ /sbin/ifconfig 
eth0      Link encap:Ethernet  HWaddr ,,,
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:18 

...

It does appear that

  ip link set "$iface" up || true

is something new, probably from upgrading to jessie.

I haven't tried to trace whether /etc/init.d/networking is calling
ifup_hotplug () on eth0 or any other interface. It's perfectly
possible that my eth0 is up because I (wicd) am watching for the wired
interface to appear (because it should prefer it to wlan).

Cheers,
David.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150318033956.ga25...@alum.home

Reply via email to