mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
newdevice: Changed Solaris and Allied discovery to yaml (#6900)
Add SunOS to callback sanitize
This commit is contained in:
committed by
Neil Lathwood
parent
092f6922a9
commit
d47b58bf6d
@@ -79,8 +79,8 @@ if ($enabled == 1) {
|
||||
|
||||
// sanitize sysDescr
|
||||
$device_info = array_map(function ($entry) {
|
||||
// remove hostnames from linux and macosx
|
||||
$entry['sysDescr'] = preg_replace_callback('/^(Linux |Darwin |FreeBSD )[A-Za-z0-9._\-]+ ([0-9.]{3,9})/', function ($matches) {
|
||||
// remove hostnames from linux, macosx, and SunOS
|
||||
$entry['sysDescr'] = preg_replace_callback('/^(Linux |Darwin |FreeBSD |SunOS )[A-Za-z0-9._\-]+ ([0-9.]{3,9})/', function ($matches) {
|
||||
return $matches[1] . 'hostname ' .$matches[2];
|
||||
}, $entry['sysDescr']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user