From f468b48049f3943e746457c7eba1d5bd7a292f0d Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 5 May 2013 16:20:39 +0100 Subject: [PATCH] Handle whitespace ahead of OUI data --- Netdisco/Changes | 5 +++-- Netdisco/bin/netdisco-deploy | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Netdisco/Changes b/Netdisco/Changes index 6fe26ea4..7ee22be0 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -4,8 +4,8 @@ * Finally we have a discover/refresh daemon job :) * Also... a Scheduler which removes need for crontab installation - * The netdisco-do script can run a one-off discover for a device - * Can select MAC Address display format on Node and Device Port search + * The netdisco-do script can run any one-off job + * Select MAC Address display format on Node and Device Port search [ENHANCEMENTS] @@ -22,6 +22,7 @@ * Update to latest Bootstrap and JQuery, and temp. fix #7326 in Bootstrap * Partial Name in Port search now working * Add unique constraints to topology table + * Handle whitespace ahead of OUI data 2.007000_001 - 2013-03-17 diff --git a/Netdisco/bin/netdisco-deploy b/Netdisco/bin/netdisco-deploy index a03bf1f2..017f439b 100755 --- a/Netdisco/bin/netdisco-deploy +++ b/Netdisco/bin/netdisco-deploy @@ -134,7 +134,7 @@ sub deploy_oui { if ($resp->{success}) { foreach my $line (split /\n/, $resp->{content}) { - if ($line =~ m/^(.{2}-.{2}-.{2})\s+\(hex\)\s+(.*)\s*$/i) { + if ($line =~ m/^\s*(.{2}-.{2}-.{2})\s+\(hex\)\s+(.*)\s*$/i) { my ($oui, $company) = ($1, $2); $oui =~ s/-/:/g; $data{lc($oui)} = $company;