Module: check_mk
Branch: master
Commit: 13861c7cb8ae833d870387f69b5c2e2ce4b9cca3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=13861c7cb8ae83…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Tue Mar 15 10:22:22 2016 +0100
isc_dhcpd: fixed stripping of configuration lines
---
agents/plugins/isc_dhcpd | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/agents/plugins/isc_dhcpd b/agents/plugins/isc_dhcpd
index 3278460..ef6b6f0 100755
--- a/agents/plugins/isc_dhcpd
+++ b/agents/plugins/isc_dhcpd
@@ -31,11 +31,12 @@ sys.stdout.write('[pools]\n')
def parse_config(filename):
for line in file(filename):
+ line = line.strip()
if line.startswith("include"):
included_file = re.search('include\s+"(.*)"',
line).group(1)
parse_config(included_file)
elif line.startswith("range"):
- sys.stdout.write(line[5:].strip() + "\n")
+ sys.stdout.write(line[5:].strip("\t ;") + "\n")
parse_config(conf_file)