From aeb2b20fd863f9f93c815ea0cde06ee12ea1a14a Mon Sep 17 00:00:00 2001 From: root Date: Thu, 17 Apr 2014 13:05:23 +0200 Subject: More netlists for TG14. --- clients/lldpdiscover.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'clients') diff --git a/clients/lldpdiscover.pl b/clients/lldpdiscover.pl index 581f2d8..f72314e 100755 --- a/clients/lldpdiscover.pl +++ b/clients/lldpdiscover.pl @@ -37,7 +37,7 @@ while (my $ref = $snmpq->fetchrow_hashref) { } # First, find all machines that lack an LLDP chassis ID. -my $q = $dbh->prepare("SELECT switch, ip, community FROM switches WHERE lldp_chassis_id IS NULL AND ip <> '127.0.0.1' AND switchtype <> 'dlink3100'"); +my $q = $dbh->prepare("SELECT switch, ip, community FROM switches WHERE lldp_chassis_id IS NULL AND ip <> '127.0.0.1'"); $q->execute; while (my $ref = $q->fetchrow_hashref) { @@ -55,6 +55,7 @@ while (my $ref = $q->fetchrow_hashref) { $dbh->rollback; } } +$dbh->commit; # Now ask all switches for their LLDP neighbor table. $q = $dbh->prepare("SELECT ip, sysname, community FROM switches WHERE lldp_chassis_id IS NOT NULL AND ip <> '127.0.0.1' AND switchtype <> 'dlink3100'"); @@ -69,6 +70,7 @@ while (my $ref = $q->fetchrow_hashref) { mylog("ERROR: $@ (during poll of $ip)"); $dbh->rollback; } + $dbh->commit; } $dbh->disconnect; -- cgit v1.2.3