Try to find rancid file based on both fqdn and short host name #2807

Merged
merged 2 commits into from Jan 19, 2016

Projects

None yet

3 participants

@wiad
Contributor
wiad commented Jan 19, 2016

In our environment hostnames in rancid are set up as short hostnames (i.e no domain) but in our librenms installation we use fqdn. This patch tries to locate the rancid file based on several different device name formats:

  • device name as stored in librenms
  • device name without domain (i.e. short hostname).
  • device name with added domain, if "$config['mydomain']" is set.
@wiad wiad Try to find rancid file based on both fqdn and short host name
582c398
@laf
Member
laf commented Jan 19, 2016

Thanks @wiad.

On the lines that are:

} elseif { or } else {

Can you change to:

}
elseif {

}
else {

Please?

@wiad wiad fix if statement style
dda9474
@wiad
Contributor
wiad commented Jan 19, 2016

Of course, fixed.

@laf laf merged commit 9219af1 into librenms:master Jan 19, 2016

2 checks passed

Auto-Deploy Build finished. No test results found.
Details
Scrutinizer No new issues
Details
@wiad wiad deleted the wiad:issue-2806 branch Jan 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment