librenms/includes/discovery/os/macosx.inc.php
Florian Beer 3272b82958 newdevice: Add OS detection for macOS Sierra (#4557)
* Add OS detection for macOS Sierra

Darwin Kernel Version 16

* Add OS discovery test for macOS Sierra
2016-09-23 12:38:22 -05:00

19 lines
675 B
PHP

<?php
/*
* LibreNMS
*
* Copyright (c) 2015 Søren Friis Rosiak <sorenrosiak@gmail.com>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if (!$os) {
if (strpos($sysObjectId, '1.3.6.1.4.1.8072.3.2.16') !== false ||
preg_match('/Darwin Kernel Version 15/', $sysDescr) ||
preg_match('/Darwin Kernel Version 16/', $sysDescr) ) {
$os = 'macosx';
}
}