Commit 203134cd authored by Romain Courteaud's avatar Romain Courteaud Committed by Antoine Catton

cron.d name should be mandatory.

Do not always use 'name' as filename, or it only generates one file...
parent 47db8dfd
...@@ -58,13 +58,10 @@ class Recipe(GenericBaseRecipe): ...@@ -58,13 +58,10 @@ class Recipe(GenericBaseRecipe):
class Part(GenericBaseRecipe): class Part(GenericBaseRecipe):
def _options(self, options):
if 'name' not in options:
options['name'] = self.name
def install(self): def install(self):
cron_d = self.options['cron-entries'] cron_d = self.options['cron-entries']
filename = os.path.join(cron_d, 'name') name = self.options['name']
filename = os.path.join(cron_d, name)
with open(filename, 'w') as part: with open(filename, 'w') as part:
part.write('%(frequency)s %(command)s\n' % { part.write('%(frequency)s %(command)s\n' % {
......
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