mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: only run pre-cache for the current OS (#6453)
Change powerwalker to use the $pre_cache array
This commit is contained in:
committed by
Neil Lathwood
parent
2ced131cf5
commit
c88c677a16
@@ -3,7 +3,14 @@
|
||||
$valid['sensor'] = array();
|
||||
|
||||
// Pre-cache data for later use
|
||||
require 'includes/discovery/sensors/pre-cache.inc.php';
|
||||
$pre_cache = array();
|
||||
$pre_cache_file = 'includes/discovery/sensors/pre-cache/' . $device['os'] . '.inc.php';
|
||||
if (is_file($pre_cache_file)) {
|
||||
echo "Pre-cache {$device['os']}: ";
|
||||
include $pre_cache_file;
|
||||
echo PHP_EOL;
|
||||
d_echo($pre_cache);
|
||||
}
|
||||
|
||||
// Run custom sensors
|
||||
require 'includes/discovery/sensors/cisco-entity-sensor.inc.php';
|
||||
|
Reference in New Issue
Block a user