diff options
| -rw-r--r-- | debian/changelog | 8 | ||||
| -rw-r--r-- | debian/control | 2 | ||||
| -rwxr-xr-x | debian/ifenslave.if-post-down | 6 | ||||
| -rwxr-xr-x | debian/ifenslave.if-pre-up | 4 | ||||
| -rwxr-xr-x | debian/ifenslave.if-up | 2 |
5 files changed, 16 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog index 4531a8a..581bb73 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +ifenslave (2.5) unstable; urgency=low + + * "ifupdown (>= 0.7.46)" compatibility update (Closes: #742410). + Thanks to Andrew Shadura. + * Added versioned Depends on "ifupdown (>= 0.7.46)". + + -- Dmitry Smirnov <onlyjob@debian.org> Mon, 24 Mar 2014 18:26:30 +1100 + ifenslave (2.4) unstable; urgency=medium * Added "ifenslave-2.6.prerm" to remove dangling alternatives diff --git a/debian/control b/debian/control index d464174..570cb14 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/ifenslave.git Package: ifenslave Architecture: all Multi-Arch: foreign -Depends: ${misc:Depends}, ifupdown, iproute2 +Depends: ${misc:Depends}, ifupdown (>= 0.7.46), iproute2 Recommends: net-tools Breaks: ifenslave-2.6 (<< 1.1.0-22) Replaces: ifenslave-2.6 (<< 1.1.0-22) diff --git a/debian/ifenslave.if-post-down b/debian/ifenslave.if-post-down index e972940..a192ca5 100755 --- a/debian/ifenslave.if-post-down +++ b/debian/ifenslave.if-post-down @@ -2,6 +2,8 @@ [ "$VERBOSITY" = 1 ] && set -x +[ "$ADDRFAM" = meta ] && exit 0 + sysfs() { # Called with : @@ -25,7 +27,6 @@ sysfs_remove_all() } 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 @@ -53,9 +54,8 @@ sysfs_remove_all arp_ip_target [ "$VERBOSITY" = 1 ] && v=-v read slaves < "$BOND_PARAMS/slaves" 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 $slave && ifdown $v $slave # Anyway, ensure $slave is free. if [ -f "/sys/class/net/$slave/master/bonding/slaves" ] ; then diff --git a/debian/ifenslave.if-pre-up b/debian/ifenslave.if-pre-up index 439204f..a545f10 100755 --- a/debian/ifenslave.if-pre-up +++ b/debian/ifenslave.if-pre-up @@ -2,7 +2,7 @@ [ "$VERBOSITY" = 1 ] && set -x -IFSTATE=/etc/network/run/ifstate +[ "$ADDRFAM" = meta ] && exit 0 add_master() { @@ -89,7 +89,7 @@ enslave_slaves() [ "$VERBOSITY" = 1 ] && v=-v for slave in $BOND_SLAVES ; do - if ( [ "$AUTOIF" ] && grep -q "^$slave=" $IFSTATE ) ; then + if ( [ "$AUTOIF" ] && ifquery --state $slave ) ; then echo "Not enslaving interface $slave since it is already configured" else # Ensure $slave is down. diff --git a/debian/ifenslave.if-up b/debian/ifenslave.if-up index 8757d97..4d83751 100755 --- a/debian/ifenslave.if-up +++ b/debian/ifenslave.if-up @@ -2,6 +2,8 @@ [ "$VERBOSITY" = 1 ] && set -x +[ "$ADDRFAM" = meta ] && exit 0 + sysfs() { # Called with : |
