Module: check_mk
Branch: master
Commit: 23cb931b753c88d650c74c6d7195e07244795975
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=23cb931b753c88…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Apr 29 15:05:56 2011 +0200
find configuration file in subdirectories of conf.d also
---
ChangeLog | 1 +
modules/check_mk.py | 4 +++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index eafc253..22b3738 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@
* --debug now implies -v
* new option --debug: creates execution profile of check_mk itself
* sped up use of stored snmp walks
+ * find configuration file in subdirectories of conf.d also
Multisite:
* FIX: webservice: suppress livestatus errors in multi-site setups
diff --git a/modules/check_mk.py b/modules/check_mk.py
index da09961..0066b10 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -3846,7 +3846,9 @@ def all_nonfunction_vars():
# Create list of all files to be included
-list_of_files = glob.glob(check_mk_configdir + '/*.mk')
+list_of_files = reduce(lambda a,b: a+b,
+ [ [ "%s/%s" % (d, f) for f in fs if f.endswith(".mk")]
+ for d, sb, fs in os.walk(check_mk_configdir) ], [])
list_of_files.sort()
list_of_files = [ check_mk_configfile ] + list_of_files
final_mk = check_mk_basedir + "/final.mk"