Hi...

Forgot to attach the patches... :-/ Here we are.

Bye

Sven

-- 
Leukämie     -> http://de.wikipedia.org/wiki/Leuk%C3%A4mie
Heilung      -> http://de.wikipedia.org/wiki/Knochenmark#Knochenmarkspende
Typisierung  -> http://www.knochenmarkspende.de/html/reg_akb.php
Warum&Fragen -> s...@velt.de
>From 31d5a44c0f5729970385a3267adb192dec4dcb58 Mon Sep 17 00:00:00 2001
From: Sven Velt <s...@velt.de>
Date: Sat, 21 Aug 2010 16:49:21 +0200
Subject: [PATCH 1/2] Fix: cfg_dir with absolute pathnames (and improvements)

- Log processed cfg files
- Exit if not existing dir is specified in config
---
 shinken/config.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/shinken/config.py b/shinken/config.py
index f8c4e3d..6bc9bbe 100644
--- a/shinken/config.py
+++ b/shinken/config.py
@@ -317,12 +317,16 @@ class Config(Item):
                 elif re.search("^cfg_dir", line):
                     elts = line.split('=')
                     if os.path.isabs(elts[1]):
-                        cfg_file_name = elts[1]
+                        cfg_dir_name = elts[1]
                     else:
                         cfg_dir_name = os.path.join(config_base_dir, elts[1])
+                    if not os.path.isdir(cfg_dir_name):
+                        Log().log("Error: Cannot open config dir '%s' for 
reading" % cfg_dir_name)
+                        self.conf_is_correct = False
                     for root, dirs, files in os.walk(cfg_dir_name):
                         for file in files:
                             if re.search("\.cfg$", file):
+                                Log().log("Processing object config file '%s'" 
% os.path.join(root, file))
                                 try:
 
                                     fd = open(os.path.join(root, file))
-- 
1.7.1


>From 32189058d59172ff1ee8b53094237b275fae9302 Mon Sep 17 00:00:00 2001
From: Sven Velt <s...@velt.de>
Date: Sat, 21 Aug 2010 16:51:51 +0200
Subject: [PATCH 2/2] Fix: Incorrect host attribute in error message

---
 shinken/host.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/shinken/host.py b/shinken/host.py
index bd95f99..174dd67 100644
--- a/shinken/host.py
+++ b/shinken/host.py
@@ -301,7 +301,7 @@ class Host(SchedulingItem):
             state = False
         #If active check is enabled with a check_interval!=0, we must have a 
check_timeperiod
         if (hasattr(self, 'active_checks_enabled') and 
self.active_checks_enabled) and (not hasattr(self, 'check_period') or 
self.check_period == None) and (hasattr(self, 'check_interval') and 
self.check_interval!=0):
-            Log().log("%s : My check_timeperiod is not correct" % 
self.get_name())
+            Log().log("%s : My check_period is not correct" % self.get_name())
             state = False
         if not hasattr(self, 'check_period'):
             self.check_period = None
-- 
1.7.1

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Shinken-devel mailing list
Shinken-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shinken-devel

Reply via email to