summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-12-22 14:41:31 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-12-22 14:51:32 -0800
commitd350f1500cde8c14a4e4bb627da4723c06840cb2 (patch)
treeff479ff10ebcb0e054252796a1657c6c5883423e
parent58dbee10b4dfa1c2cf6a644e7818983c296a96fb (diff)
downloadvyatta-cfg-quagga-d350f1500cde8c14a4e4bb627da4723c06840cb2.tar.gz
vyatta-cfg-quagga-d350f1500cde8c14a4e4bb627da4723c06840cb2.zip
Bring device to up state when removed from bond
Bug 5061 Force device back to up state when leaving bond group.
-rwxr-xr-xscripts/vyatta-bonding.pl9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/vyatta-bonding.pl b/scripts/vyatta-bonding.pl
index 3012c5f9..3ecffdda 100755
--- a/scripts/vyatta-bonding.pl
+++ b/scripts/vyatta-bonding.pl
@@ -170,6 +170,13 @@ sub add_port {
add_slave ($intf, $slave);
}
+sub remove_port {
+ my ( $intf, $slave ) = @_;
+
+ remove_slave ($intf, $slave);
+ if_up ($slave);
+}
+
sub usage {
print "Usage: $0 --dev=bondX --mode={mode}\n";
print " $0 --dev=bondX --add=ethX\n";
@@ -192,4 +199,4 @@ die "$0: device not specified\n" unless $dev;
change_mode( $dev, $mode ) if $mode;
add_port( $dev, $add_port ) if $add_port;
-remove_slave( $dev, $rem_port ) if $rem_port;
+remove_port( $dev, $rem_port ) if $rem_port;