Package: ifenslave
Version: 2.4
Severity: important
Tags: patch

Here's a patch to fix some issues with latest ifupdown versions.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.12-1-686-pae (SMP w/4 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/mksh

Versions of packages ifenslave depends on:
ii  ifupdown  0.7.47.2
ii  iproute2  3.9.0-5

Versions of packages ifenslave recommends:
ii  net-tools  1.60-24.2

ifenslave suggests no packages.

-- no debconf information
--- a/ifenslave
+++ b/ifenslave
@@ -2,6 +2,8 @@
 
 [ "$VERBOSITY" = 1 ] && set -x
 
+[ "$ADDRFAM" = meta ] && exit 0
+
 sysfs()
 {
 	# Called with :
@@ -25,7 +27,6 @@
 }
 
 BOND_PARAMS="/sys/class/net/$IFACE/bonding"
-IFSTATE=/etc/network/run/ifstate
 
 # free $IFACE if it is currently enslaved to a bonding device.
 if [ -f "/sys/class/net/$IFACE/master/bonding/slaves" ] ; then
@@ -55,7 +56,7 @@
 for slave in $slaves ; do
 	# If $slave is currently up in $IFSTATE, then bring it down, to keep $IFSTATE consistent.
 	# This is supposed to have the side effect of freeing the interface.
-	grep -q "^$slave=" $IFSTATE && ifdown $v $slave
+	ifquery --state | grep -q "^$slave=" && ifdown $v $slave
 
 	# Anyway, ensure $slave is free.
 	if [ -f "/sys/class/net/$slave/master/bonding/slaves" ] ; then

Reply via email to