mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Try to find rancid file based on both fqdn and short host name
This commit is contained in:
@@ -16,7 +16,15 @@ if ($_SESSION['userlevel'] >= '7') {
|
|||||||
|
|
||||||
if (is_file($configs.$device['hostname'])) {
|
if (is_file($configs.$device['hostname'])) {
|
||||||
$file = $configs.$device['hostname'];
|
$file = $configs.$device['hostname'];
|
||||||
}
|
} elseif (is_file($configs.strtok($device['hostname'], '.'))) { // Strip domain
|
||||||
|
$file = $configs.strtok($device['hostname'], '.');
|
||||||
|
} else {
|
||||||
|
if (!empty($config['mydomain'])) { // Try with domain name if set
|
||||||
|
if (is_file($configs.$device['hostname'].'.'.$config['mydomain'])) {
|
||||||
|
$file = $configs.$device['hostname'].'.'.$config['mydomain'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // end if
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<div style="clear: both;">';
|
echo '<div style="clear: both;">';
|
||||||
|
|||||||
Reference in New Issue
Block a user