From ceddc37f07455effcfd1030f0cc39e0175edad14 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Sat, 24 Aug 2013 21:35:10 -0500 Subject: [PATCH] Fix for the cron module on FreeBSD Apparently crontab on freebsd does not like the file path coming before the "-u username" portion of the command to install the crontab --- library/system/cron | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/system/cron b/library/system/cron index ce4ab70f43..81e411168b 100644 --- a/library/system/cron +++ b/library/system/cron @@ -345,7 +345,7 @@ class CronTab(object): """ Returns the command line for reading a crontab """ - return "%s -l%s" % (CRONCMD, self._user_execute()) + return "%s -l %s" % (CRONCMD, self._user_execute()) def _read_user_execute(self): """ @@ -357,14 +357,14 @@ class CronTab(object): """ Return the command line for writing a crontab """ - return "%s %s %s" % (CRONCMD, path, self._user_execute()) + return "%s %s %s" % (CRONCMD, self._user_execute(), path) def _user_execute(self): """ User command switches to append to the read and write commands. """ if self.user: - return "%s %s" % (' -u ', str(self.user)) + return "%s %s" % ('-u', str(self.user)) return '' #==================================================