summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-03 08:15:05 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-03 10:35:12 -0800
commitb02d54681516d3f00cf6975eef3f13531bddf5ff (patch)
treef6c291dbae96190ed070350a6a6348df24f0bd48
parentda9b61521689a4590f5f4e4a56e070032696d846 (diff)
downloadvyatta-cfg-quagga-b02d54681516d3f00cf6975eef3f13531bddf5ff.tar.gz
vyatta-cfg-quagga-b02d54681516d3f00cf6975eef3f13531bddf5ff.zip
Run through tidy for indent
-rwxr-xr-xscripts/vyatta-bonding.pl19
1 files changed, 9 insertions, 10 deletions
diff --git a/scripts/vyatta-bonding.pl b/scripts/vyatta-bonding.pl
index d9e0ebc4..eda99673 100755
--- a/scripts/vyatta-bonding.pl
+++ b/scripts/vyatta-bonding.pl
@@ -36,13 +36,13 @@ use strict;
use warnings;
my %modes = (
- "round-robin" => 0,
- "active-backup" => 1,
- "xor-hash" => 2,
- "broadcast" => 3,
- "802.3ad" => 4,
- "transmit-load-balance" => 5,
- "adaptive-load-balance" => 6,
+ "round-robin" => 0,
+ "active-backup" => 1,
+ "xor-hash" => 2,
+ "broadcast" => 3,
+ "802.3ad" => 4,
+ "transmit-load-balance" => 5,
+ "adaptive-load-balance" => 6,
);
sub create_bond {
@@ -50,7 +50,7 @@ sub create_bond {
my $config = new Vyatta::Config;
$config->setLevel("interfaces bonding $bond");
- my $mode = $modes{$config->returnValue("mode")};
+ my $mode = $modes{ $config->returnValue("mode") };
defined $mode or die "bonding mode not defined";
system("sudo modprobe -o \"$bond\" bonding mode=$mode") == 0
@@ -62,7 +62,7 @@ sub create_bond {
$config->setLevel("interfaces ethernet");
for my $intf ( $config->listNodes() ) {
my $group = $config->returnValue("bond-group");
- if (defined $group && $group eq $bond ) {
+ if ( defined $group && $group eq $bond ) {
system("sudo ifenslave $bond $intf") == 0
or die "Adding $intf to $bond failed\n";
}
@@ -103,4 +103,3 @@ GetOptions(
'mode-change=s' => sub { change_bond( $_[1] ); },
) or usage();
-