diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-03-28 18:19:24 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-03-28 18:19:24 -0500 |
commit | 323027ffe3dd0cb082d731bb01d8219c6ed7122c (patch) | |
tree | 353c9c49cbff44571b7ddff636d16eb8d9f68788 /scripts/vyatta-interfaces.pl | |
parent | 2b7b40b018efdf0fbad1a2c1e37f70da30aa3d8b (diff) | |
parent | 1fb6a13244dfd04f121cc7625c199cf963572b97 (diff) | |
download | vyatta-cfg-quagga-323027ffe3dd0cb082d731bb01d8219c6ed7122c.tar.gz vyatta-cfg-quagga-323027ffe3dd0cb082d731bb01d8219c6ed7122c.zip |
Merge branch 'napa' of git.vyatta.com:/git/vyatta-cfg-system into napa
Diffstat (limited to 'scripts/vyatta-interfaces.pl')
-rwxr-xr-x | scripts/vyatta-interfaces.pl | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index c2ec9a44..30b35c05 100755 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -452,14 +452,13 @@ sub set_speed_duplex { # read old values to avoid meaningless speed changes my ($autoneg, $ospeed, $oduplex) = get_ethtool($intf); - if (defined($autoneg)) { - if ($autoneg == 1) { - # Device is already in autonegotiation mode - return if ($nspeed eq 'auto'); - } else { - # Device has explicit speed/duplex but they already match - return if (($nspeed eq $ospeed) && ($nduplex eq $oduplex)); - } + + if (defined($autoneg) && $autoneg == 1) { + # Device is already in autonegotiation mode + return if ($nspeed eq 'auto'); + } elsif (defined($ospeed) && defined($oduplex)) { + # Device has explicit speed/duplex but they already match + return if (($nspeed eq $ospeed) && ($nduplex eq $oduplex)); } my $cmd = "$ETHTOOL -s $intf"; |