aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2005-12-11 22:00:56 +0000
committerFelix Fietkau <nbd@openwrt.org>2005-12-11 22:00:56 +0000
commitb4a4a1480a91e0dc76bdea89da63912b2561f536 (patch)
tree4112eebe8902a9b1b527f7b723a9b40e364f53e1
parent565f9985db391208ff03759f3912f4c9a3ddb40e (diff)
downloadupstream-b4a4a1480a91e0dc76bdea89da63912b2561f536.tar.gz
upstream-b4a4a1480a91e0dc76bdea89da63912b2561f536.tar.bz2
upstream-b4a4a1480a91e0dc76bdea89da63912b2561f536.zip
create /var/spool/cron in cron init script and change the default crontab location to /etc/crontabs (fixes #88)
SVN-Revision: 2621
-rwxr-xr-xopenwrt/package/base-files/default/etc/init.d/S60cron5
-rw-r--r--openwrt/package/busybox/patches/200-etc_crontabs.patch24
2 files changed, 28 insertions, 1 deletions
diff --git a/openwrt/package/base-files/default/etc/init.d/S60cron b/openwrt/package/base-files/default/etc/init.d/S60cron
index ed43e743d0..6647fe1bc0 100755
--- a/openwrt/package/base-files/default/etc/init.d/S60cron
+++ b/openwrt/package/base-files/default/etc/init.d/S60cron
@@ -1,2 +1,5 @@
#!/bin/sh
-[ -d /etc/crontabs ] && crond -c /etc/crontabs
+[ -d /etc/crontabs ] && {
+ mkdir -p /var/spool/cron
+ crond -c /etc/crontabs
+}
diff --git a/openwrt/package/busybox/patches/200-etc_crontabs.patch b/openwrt/package/busybox/patches/200-etc_crontabs.patch
new file mode 100644
index 0000000000..5ec01c1eb0
--- /dev/null
+++ b/openwrt/package/busybox/patches/200-etc_crontabs.patch
@@ -0,0 +1,24 @@
+diff -urN busybox.old/miscutils/crond.c busybox.dev/miscutils/crond.c
+--- busybox.old/miscutils/crond.c 2004-04-14 19:51:21.000000000 +0200
++++ busybox.dev/miscutils/crond.c 2005-12-11 22:54:07.878256250 +0100
+@@ -36,7 +36,7 @@
+ #define arysize(ary) (sizeof(ary)/sizeof((ary)[0]))
+
+ #ifndef CRONTABS
+-#define CRONTABS "/var/spool/cron/crontabs"
++#define CRONTABS "/etc/crontabs"
+ #endif
+ #ifndef TMPDIR
+ #define TMPDIR "/var/spool/cron"
+diff -urN busybox.old/miscutils/crontab.c busybox.dev/miscutils/crontab.c
+--- busybox.old/miscutils/crontab.c 2004-04-14 19:51:21.000000000 +0200
++++ busybox.dev/miscutils/crontab.c 2005-12-11 22:54:28.647554250 +0100
+@@ -28,7 +28,7 @@
+ #include <sys/resource.h>
+
+ #ifndef CRONTABS
+-#define CRONTABS "/var/spool/cron/crontabs"
++#define CRONTABS "/etc/crontabs"
+ #endif
+ #ifndef TMPDIR
+ #define TMPDIR "/var/spool/cron"