diff --git a/Info/EtherLike.pm b/Info/EtherLike.pm index 8e603c93..a7f66472 100644 --- a/Info/EtherLike.pm +++ b/Info/EtherLike.pm @@ -69,7 +69,18 @@ use vars qw/$VERSION $DEBUG %MIBS %FUNCS %GLOBALS %MUNGE $INIT/; 'el_coll_freq' => 'dot3CollFrequencies' ); -%MUNGE = ( %SNMP::Info::MUNGE ); +%MUNGE = ( %SNMP::Info::MUNGE, + 'el_duplex' => \&munge_el_duplex, + ); + +sub munge_el_duplex { + my $duplex = shift; + return unless defined $duplex; + + $duplex =~ s/Duplex$//; + return $duplex; +} + 1; __END__ @@ -106,10 +117,6 @@ Max Baker my $iid = $el_index->{$el_port}; my $port = $interfaces->{$iid}; - $duplex = 'half' if $duplex =~/half/i; - $duplex = 'full' if $duplex =~/full/i; - $duplex = 'auto' if $duplex =~/auto/i; - print "PORT:$port set to duplex:$duplex\n"; }