From b32d9257798548553800a71b7bffe39b2c6b6277 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Fri, 13 Apr 2012 23:10:32 +0000 Subject: [PATCH] improve hp procurve version detection git-svn-id: http://www.observium.org/svn/observer/trunk@3034 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/polling/os.inc.php | 70 ++++++++++++++-------------- includes/polling/os/procurve.inc.php | 14 +++++- 2 files changed, 47 insertions(+), 37 deletions(-) diff --git a/includes/polling/os.inc.php b/includes/polling/os.inc.php index 356fdd952..889f6ef5d 100644 --- a/includes/polling/os.inc.php +++ b/includes/polling/os.inc.php @@ -1,44 +1,44 @@ ".$version, $device, 'system'); - } +if ($version && $device['version'] != $version) +{ + $update_array['version'] = $version; + log_event("OS Version -> ".$version, $device, 'system'); +} - if ($features != $device['features']) - { - $update_array['features'] = $features; - log_event("OS Features -> ".$features, $device, 'system'); - } +if ($features != $device['features']) +{ + $update_array['features'] = $features; + log_event("OS Features -> ".$features, $device, 'system'); +} - if ($hardware && $hardware != $device['hardware']) - { - $update_array['hardware'] = $hardware; - log_event("Hardware -> ".$hardware, $device, 'system'); - } +if ($hardware && $hardware != $device['hardware']) +{ + $update_array['hardware'] = $hardware; + log_event("Hardware -> ".$hardware, $device, 'system'); +} - if ($serial && $serial != $device['serial']) - { - $update_array['serial'] = $serial; - log_event("serial -> ".$serial, $device, 'system'); - } +if ($serial && $serial != $device['serial']) +{ + $update_array['serial'] = $serial; + log_event("Serial -> ".$serial, $device, 'system'); +} - echo("Hardware: ".$hardware." Version: ".$version." Features: ".$features."\n"); +echo("\nHardware: ".$hardware." Version: ".$version." Features: ".$features." Serial: ".$serial."\n"); ?> diff --git a/includes/polling/os/procurve.inc.php b/includes/polling/os/procurve.inc.php index 5b5b4d5f8..843411785 100755 --- a/includes/polling/os/procurve.inc.php +++ b/includes/polling/os/procurve.inc.php @@ -1,7 +1,17 @@