Bug#630137: check-network-cable should be able to run without ethtool or mii-tool installed
Hello, On Sun, 12 Jun 2011 22:16:51 +0200 Javier Fernández-Sanguino Peña j...@computer.org wrote: On Sat, Jun 11, 2011 at 02:13:56PM +0300, Andrew O. Shadoura wrote: This isn't really needed as it can use `ip link show` to determine the interface status. I'm afraid I'm not sure that is correct. Take the following example of a system that has eth0 and eth1 and only the second one (eth0) has a network cable plugged in: I'm afraid that as soon as an interface is 'UP' in the system 'ip link show' will indicate it is up even though it does not have link. I would appreciate if you could proppose an exact way in which to use ip in this context. If not, I will have to close this bug. Well, then the code in the script isn't correct and possibly should be removed anyway. But thanks for showing it doesn't actually works. -- WBR, Andrew signature.asc Description: PGP signature
Bug#630137: check-network-cable should be able to run without ethtool or mii-tool installed
On Sat, Jun 11, 2011 at 02:13:56PM +0300, Andrew O. Shadoura wrote: This isn't really needed as it can use `ip link show` to determine the interface status. I'm afraid I'm not sure that is correct. Take the following example of a system that has eth0 and eth1 and only the second one (eth0) has a network cable plugged in: jfs@silicio$ ip link show eth0 2: eth0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000 link/ether 00:11:2f:80:11:1b brd ff:ff:ff:ff:ff:ff jfs@silicio:$ ip link show eth1 3: eth1: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000 link/ether 00:c0:df:03:c5:e9 brd ff:ff:ff:ff:ff:ff jfs@silicio:$ sudo mii-tool eth0 eth0: no link jfs@silicio:$ sudo mii-tool eth1 eth1: negotiated 100baseTx-FD flow-control, link ok And 'ip link show up' lists both of these interfaces, even if eth0 does not have a hardware link. I'm afraid that as soon as an interface is 'UP' in the system 'ip link show' will indicate it is up even though it does not have link. I would appreciate if you could proppose an exact way in which to use ip in this context. If not, I will have to close this bug. Regards Javier signature.asc Description: Digital signature
Bug#630137: check-network-cable should be able to run without ethtool or mii-tool installed
Package: ifupdown-extra Version: 0.17 Severity: minor Currently, the script has the following check: # Do not continue if ETHTOOL and MIITOOL is not available [ ! -x $ETHTOOL ] [ ! -x $MIITOOL ] exit 0 This isn't really needed as it can use `ip link show` to determine the interface status. -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.38-1-686 (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages ifupdown-extra depends on: ii bind9-host [host] 1:9.7.1.dfsg.P2-2 Version of 'host' bundled with BIN ii iproute20080725-2networking and traffic control too ii iputils-arping 3:20100418-3 Tool to send ICMP echo requests to ii iputils-ping [ping]3:20100418-3 Tools to test the reachability of ii net-tools 1.60-22 The NET-3 networking toolkit ii netcat 1.10-38 TCP/IP swiss army knife -- transit ii netcat-traditional [ne 1.10-38 TCP/IP swiss army knife Versions of packages ifupdown-extra recommends: ii ethtool 6+20090323-2 display or change Ethernet device ifupdown-extra suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org