diff options
author | Tilman Sauerbeck <tilman@crux.nu> | 2010-07-02 20:34:43 +0200 |
---|---|---|
committer | Tilman Sauerbeck <tilman@crux.nu> | 2010-07-02 20:35:54 +0200 |
commit | 57586fdfa4b8bb5001cd6a04caeceadf9759a07b (patch) | |
tree | a908ebb31d4076204e5d0f2439bc1928d55649bc /dcron | |
parent | ea02e2e6ab31baa8be9c37e3f293e4a97ab8f185 (diff) | |
download | core-57586fdfa4b8bb5001cd6a04caeceadf9759a07b.tar.gz core-57586fdfa4b8bb5001cd6a04caeceadf9759a07b.tar.xz |
dcron: fixed @hourly and @monthly jobs.
@monthly jobs would run hearly without this patch, and @hourly jobs
would run only every second hour if the system is in DST.
Diffstat (limited to 'dcron')
-rw-r--r-- | dcron/.md5sum | 1 | ||||
-rw-r--r-- | dcron/Pkgfile | 6 | ||||
-rw-r--r-- | dcron/dcron.diff | 22 |
3 files changed, 27 insertions, 2 deletions
diff --git a/dcron/.md5sum b/dcron/.md5sum index 827fc5eb..e2a99eda 100644 --- a/dcron/.md5sum +++ b/dcron/.md5sum @@ -1,4 +1,5 @@ ad98b4e165a805ffad4396830dfd7e14 crond 3596a4fa9cf63bdf130fd533ca7703d4 crontab 02d848ba043a9df5bf2102a9f4bc04bd dcron-4.4.tar.gz +384d0dbf3523058338ad2103114f8adc dcron.diff d80b27b1b9532890136c14d30e2a0d2b runjobs diff --git a/dcron/Pkgfile b/dcron/Pkgfile index c6a83c05..ea0828ad 100644 --- a/dcron/Pkgfile +++ b/dcron/Pkgfile @@ -4,13 +4,15 @@ name=dcron version=4.4 -release=1 +release=2 source=(http://www.jimpryor.net/linux/releases/$name-$version.tar.gz \ - crontab runjobs crond) + dcron.diff crontab runjobs crond) build() { cd $name-$version + patch -p1 -i $SRC/dcron.diff + make PREFIX=/usr make DESTDIR=$PKG MANDIR=/usr/man CRONTAB_GROUP=users install diff --git a/dcron/dcron.diff b/dcron/dcron.diff new file mode 100644 index 00000000..a37adbdf --- /dev/null +++ b/dcron/dcron.diff @@ -0,0 +1,22 @@ +diff --git a/database.c b/database.c +--- a/database.c ++++ b/database.c +@@ -410,6 +410,7 @@ SynchronizeFile(const char *dpath, const char *fileName, const char *userName) + break; + case 5: + line.cl_Freq = MONTHLY_FREQ; ++ break; + case 6: + line.cl_Freq = YEARLY_FREQ; + /* else line.cl_Freq will remain 0 */ +diff --git a/database.c b/database.c +--- a/database.c ++++ b/database.c +@@ -258,6 +258,7 @@ ReadTimestamps(const char *user) + if (ptr && (*ptr == 0 || *ptr == '\n')) + /* strptime uses current seconds when seconds not specified? anyway, we don't get round minutes */ + tm.tm_sec = 0; ++ tm.tm_isdst = -1; + sec = mktime(&tm); + if (sec == (time_t)-1) { + printlogf(LOG_ERR, "failed parsing timestamp for user %s job %s\n", file->cf_UserName, line->cl_JobName); |