aboutsummaryrefslogtreecommitdiffstats
path: root/clients
diff options
context:
space:
mode:
authorroot <root@frank.tg14.gathering.org>2014-04-17 13:05:23 +0200
committerroot <root@frank.tg14.gathering.org>2014-04-17 13:05:23 +0200
commitaeb2b20fd863f9f93c815ea0cde06ee12ea1a14a (patch)
tree499b28fb46831623b5821934948c7706d46eca9d /clients
parent6e7806dfe2bf62b8f97383cf7ddccb5505b1b3d9 (diff)
More netlists for TG14.
Diffstat (limited to 'clients')
-rwxr-xr-xclients/lldpdiscover.pl4
1 files changed, 3 insertions, 1 deletions
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;