Package: ifupdown-extra Version: 0.13 Severity: normal Tags: patch When using a bonding interface (e.g. with ifenslave), check-network-cable will fail, as ethtool does not support bonding
-- System Information: Debian Release: squeeze/sid APT prefers karmic-updates APT policy: (500, 'karmic-updates'), (500, 'karmic-security'), (500, 'karmic') Architecture: i386 (i686) Kernel: Linux 2.6.31-20-generic (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages ifupdown-extra depends on: ii bind9-host [h 1:9.6.1.dfsg.P1-3ubuntu0.3 Version of 'host' bundled with BIN ii iproute 20090324-1 networking and traffic control too ii iputils-arpin 3:20071127-1build1 Tool to send ICMP echo requests to ii iputils-ping 3:20071127-1build1 Tools to test the reachability of ii net-tools 1.60-23ubuntu1 The NET-3 networking toolkit ii netcat 1.10-38 TCP/IP swiss army knife -- transit ii netcat-tradit 1.10-38 TCP/IP swiss army knife Versions of packages ifupdown-extra recommends: ii ethtool 6+20090307-1 display or change Ethernet device ifupdown-extra suggests no packages. -- no debconf information -- Man is the only animal that laughs and weeps, for he is the only animal that is struck with the difference between what things are and what they ought to be. - William Hazlitt Ohad Lutzky
diff -git a/if-up-scripts/check-network-cable b/if-up-scripts/check-network-cable index e31da56..a48682c 100755 --- a/if-up-scripts/check-network-cable +++ a/if-up-scripts/check-network-cable @@ -105,6 +105,21 @@ check_status() { return $status } +check_bond_status() { + status=1 + for slave_iface in `cat /sys/class/net/$IFACE/bonding/slaves`; do + # Use "true" to silence slaves. + OUTPUT="true" IFACE="$slave_iface" check_status + status=$? + if [ $status -eq 0 ] ; then + # One functional slave will suffice + return 0 + fi + done + $OUTPUT "WARNING: Initialising bond $IFACE which does not have link on any slave" + return $status +} + if [ -z "$IFACE" ] ; then echo "ERROR: Variable IFACE not set in environment" >&2 exit 1 @@ -118,6 +133,12 @@ case "$IFACE" in exit 1 fi ;; + bond*) + check_bond_status + if [ $? -ne 0 ] && [ "$ABORT_NO_LINK" = "yes" ] ; then + exit 1 + fi + ;; *) ;; esac exit 0