branches/ahenk/2.0/bahadir.kandemir/ahenk/ajan - Use /etc/cron.d/ahenk_software for cron jobs

Bahadır Kandemir uludag-commits at pardus.org.tr
6 Ara 2010 Pzt 11:24:47 EET


Author: bahadir.kandemir
Date: Mon Dec  6 11:24:47 2010
New Revision: 33715

Modified:
   branches/ahenk/2.0/bahadir.kandemir/ahenk/ajan/ahenk/agent/utils.py
   branches/ahenk/2.0/bahadir.kandemir/ahenk/ajan/modules/mod_software.py
Log:
Use /etc/cron.d/ahenk_software for cron jobs

---
 ahenk/agent/utils.py    |    2 +-
 modules/mod_software.py |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

Modified: branches/ahenk/2.0/bahadir.kandemir/ahenk/ajan/ahenk/agent/utils.py
=================================================================
--- branches/ahenk/2.0/bahadir.kandemir/ahenk/ajan/ahenk/agent/utils.py	(original)
+++ branches/ahenk/2.0/bahadir.kandemir/ahenk/ajan/ahenk/agent/utils.py	Mon Dec  6 11:24:47 2010
@@ -122,7 +122,7 @@
                 else:
                     locals["process"](message, options)
 
-def update_cron(command, schedule=None, username="root", noargs=False, filename="/etc/crontab"):
+def update_cron(command, schedule=None, username="root", noargs=False, filename="/etc/cron.d/ahenk"):
     """
         Updates an crontab record in /etc/crontab file.
 

Modified: branches/ahenk/2.0/bahadir.kandemir/ahenk/ajan/modules/mod_software.py
=================================================================
--- branches/ahenk/2.0/bahadir.kandemir/ahenk/ajan/modules/mod_software.py	(original)
+++ branches/ahenk/2.0/bahadir.kandemir/ahenk/ajan/modules/mod_software.py	Mon Dec  6 11:24:47 2010
@@ -86,12 +86,12 @@
         logging.info("Software: Auto update disabled.")
         if not dryrun:
             # Remove command from crontab, ignore arguments while matching records
-            utils.update_cron("ahenk_software_update", noargs=True)
+            utils.update_cron("ahenk_software_update", noargs=True, filename="/etc/cron.d/ahenk_software")
     elif mode == "security":
         logging.info("Software: Security updates will be made automatically.")
         if not dryrun:
-            utils.update_cron("ahenk_software_update --security", crondate, noargs=True)
+            utils.update_cron("ahenk_software_update --security", crondate, noargs=True, filename="/etc/cron.d/ahenk_software")
     elif mode == "full":
         logging.info("Software: All updates will be made automatically.")
         if not dryrun:
-            utils.update_cron("ahenk_software_update", crondate, noargs=True)
+            utils.update_cron("ahenk_software_update", crondate, noargs=True, filename="/etc/cron.d/ahenk_software")


Uludag-commits mesaj listesiyle ilgili daha fazla bilgi