Commit 99362b2a authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

In cron, now check if samefile instead of same name

parent b123a181
...@@ -235,9 +235,12 @@ class CronLine: ...@@ -235,9 +235,12 @@ class CronLine:
def check(self,config,logger): def check(self,config,logger):
""" Check if all attributes are correctly set""" """ Check if all attributes are correctly set"""
if self.config != os.path.join(config.slapos_configuration,'slapos.cfg'): if not os.path.exists(self.config):
logger.critical("For %s command: slapos.cfg is %s should be in %s" logger.critical("For %s command: slapos.cfg is %s should be in %s"
% (self.command,self.config,config.slapos_configuration)) % (self.command,self.config,config.slapos_configuration))
elif not os.path.samefile(self.config,os.path.join(config.slapos_configuration,'slapos.cfg')):
logger.critical("For %s command: slapos.cfg is %s should be in %s"
% (self.command,self.config,config.slapos_configuration))
if self.pidfile == None: if self.pidfile == None:
logger.warning("For %s command: No pidfile" logger.warning("For %s command: No pidfile"
% (self.command)) % (self.command))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment