![]() ![]() |
hotsanic |
Subversion Repositories: |
Compare with Previous - Blame - Download
package HotSaNICmod::common;sub version {($VERSION = '$Revision: 1.8 $') =~ s/.*(\d+\.\d+).*/$1/;return "common.pm $VERSION";}sub configure {%MODULECONFIG=HotSaNICparser::get_moduleconfig(".",(APP=>"array"));foreach (@{$MODULECONFIG{APP}}) { if ( ~/SNMP/ ) { $MODULECONFIG{USE_SNMP}=1; last; } }return %MODULECONFIG;}sub get_names {my $entry=shift || ",";my $host="";my $community="";my ($item,$description)=split /,/,$entry;if( index($item, "SNMP:") >= 0) { (undef,$host,$community,$item) = split /:/, $item; }if ($host ne "") { $name="$host:$item"; }else { $name=$item; }($dbname=$name) =~ s/:/_/g;($file=$name) =~ s/[.:]/_/g;return ($host,$community,$item,$dbname,$name,$file,$description);}1;