mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-31 16:23:50 +02:00
Updates
git-svn-id: http://www.observium.org/svn/observer/trunk@480 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -30,15 +30,12 @@
|
||||
if(!strstr($entry, "irtual")) {
|
||||
$if = trim(strtolower($ifDescr));
|
||||
$nullintf = 0;
|
||||
foreach($config['bad_if'] as $bi) {
|
||||
if (strstr($if, $bi)) {
|
||||
$nullintf = 1;
|
||||
}
|
||||
}
|
||||
foreach($config['bad_if'] as $bi) { if (strstr($if, $bi)) { $nullintf = 1; } }
|
||||
if($device['os'] == "CatOS" && strstr($if, "vlan") ) { $nullintf = 1; }
|
||||
$ifDescr = fixifName($ifDescr);
|
||||
if (preg_match('/serial[0-9]:/', $if)) { $nullintf = '1'; }
|
||||
if (preg_match('/serial[0-9]:/', $if)) { $nullintf = 1; }
|
||||
if(!$config['allow_ng']) {
|
||||
if (preg_match('/ng[0-9]+$/', $if)) { $nullintf = '1'; }
|
||||
if (preg_match('/ng[0-9]+$/', $if)) { $nullintf = 1; }
|
||||
}
|
||||
if ($nullintf == 0) {
|
||||
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `interfaces` WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '$ifIndex'"), 0) == '0') {
|
||||
@@ -46,8 +43,8 @@
|
||||
# Add Interface
|
||||
echo("+");
|
||||
} else {
|
||||
mysql_query("UPDATE `interfaces` SET `deleted` = '0', `ifDescr` = '$ifDescr' WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '$ifIndex'");
|
||||
if(mysql_affected_rows()) {
|
||||
if($interface['deleted']) {
|
||||
mysql_query("UPDATE `interfaces` SET `deleted` = '0' WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '$ifIndex'");
|
||||
echo("*");
|
||||
} else {
|
||||
echo(".");
|
||||
|
||||
Reference in New Issue
Block a user