test_class.pl script: also test devices without layers / sysServices

The test_class.pl script refused to test devices that don't implement
sysServices. Since SNMP::Info has been modified to check connectivity
by testing sysDescr as well, test_class.pl should follow that behaviour.
This commit is contained in:
Jeroen van Ingen
2011-09-09 17:14:01 +02:00
parent 0bc405792a
commit cd9c637ba5

View File

@@ -82,9 +82,10 @@ print "Detected Class: ", $dev->device_type(), "\n";
print "Using Class: $Class (-c to change)\n";
my $layers = $dev->layers();
my $descr = $dev->description();
unless (defined $layers){
die "Are you sure you got the right community string and version?\nCan't fetch layers.\n";
unless (defined $layers or defined $descr){
die "Are you sure you got the right community string and version?\nCan't fetch layers or description.\n";
}
print "Fetching global info...\n\n";