summaryrefslogtreecommitdiff
path: root/scripts/vyatta-interfaces.pl
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-12 14:39:39 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-12 14:39:39 -0800
commit1e4e24c7a635c76278f48e43ae15d7045d7eb08f (patch)
tree94af70466b871c352a41126864359c487a416855 /scripts/vyatta-interfaces.pl
parent985778af972d1ec074802604c819663af54e499e (diff)
downloadvyatta-cfg-system-1e4e24c7a635c76278f48e43ae15d7045d7eb08f.tar.gz
vyatta-cfg-system-1e4e24c7a635c76278f48e43ae15d7045d7eb08f.zip
Fix is_supported_speed matching
Typo in sprintf (perl doesn't have %c). Also improve error messages.
Diffstat (limited to 'scripts/vyatta-interfaces.pl')
-rwxr-xr-xscripts/vyatta-interfaces.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl
index 982cf0ee..009db451 100755
--- a/scripts/vyatta-interfaces.pl
+++ b/scripts/vyatta-interfaces.pl
@@ -644,7 +644,7 @@ sub set_speed_duplex {
sub is_supported_speed {
my ($dev, $speed, $duplex) = @_;
- my $wanted = sprintf("%dbase%c/%s", $speed,
+ my $wanted = sprintf("%dbase%s/%s", $speed,
($speed == 2500) ? 'X' : 'T', ucfirst($duplex));
open( my $ethtool, '-|', "$ETHTOOL $dev 2>/dev/null" )
@@ -682,13 +682,13 @@ sub check_speed_duplex {
# most basic and default case
exit 0 if ($speed eq 'auto' && $duplex eq 'auto');
- die "if speed is hardcoded, duplex must also be hardcoded\n"
+ die "If speed is hardcoded, duplex must also be hardcoded\n"
if ($duplex eq 'auto');
- die "if duplex is hardcoded, speed must also be hardcoded\n"
+ die "If duplex is hardcoded, speed must also be hardcoded\n"
if ($speed eq 'auto');
- die "$speed not supported on $dev\n"
+ die "Speed $speed, duplex $duplex not supported on $dev\n"
unless is_supported_speed($dev, $speed, $duplex);
exit 0;