diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-02-03 23:59:41 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-02-03 23:59:41 +0000 |
commit | ded5dfef6ef7df76fc54335b29ae4c214026dc1f (patch) | |
tree | 50e1f903ee48bebc050f70dec8e230d6d448ec0b | |
parent | d814c986929b0f8deba5a733250c3f59d7678277 (diff) | |
download | busybox-w32-ded5dfef6ef7df76fc54335b29ae4c214026dc1f.tar.gz busybox-w32-ded5dfef6ef7df76fc54335b29ae4c214026dc1f.tar.bz2 busybox-w32-ded5dfef6ef7df76fc54335b29ae4c214026dc1f.zip |
crond,crontab: make cron directory location configurable
-rw-r--r-- | miscutils/Config.in | 7 | ||||
-rw-r--r-- | miscutils/crond.c | 8 | ||||
-rw-r--r-- | miscutils/crontab.c | 4 |
3 files changed, 10 insertions, 9 deletions
diff --git a/miscutils/Config.in b/miscutils/Config.in index 94174de3e..f15547db1 100644 --- a/miscutils/Config.in +++ b/miscutils/Config.in | |||
@@ -121,6 +121,13 @@ config FEATURE_CROND_CALL_SENDMAIL | |||
121 | help | 121 | help |
122 | Support calling /usr/sbin/sendmail for send cmd outputs. | 122 | Support calling /usr/sbin/sendmail for send cmd outputs. |
123 | 123 | ||
124 | config FEATURE_CROND_DIR | ||
125 | string "crond spool directory" | ||
126 | default "/var/spool/cron" | ||
127 | depends on CROND || CRONTAB | ||
128 | help | ||
129 | Location of crond spool. | ||
130 | |||
124 | config CRONTAB | 131 | config CRONTAB |
125 | bool "crontab" | 132 | bool "crontab" |
126 | default n | 133 | default n |
diff --git a/miscutils/crond.c b/miscutils/crond.c index 12560fa36..b2fedb152 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c | |||
@@ -23,12 +23,8 @@ | |||
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | 25 | ||
26 | #ifndef CRONTABS | 26 | #define TMPDIR CONFIG_FEATURE_CROND_DIR |
27 | #define CRONTABS "/var/spool/cron/crontabs" | 27 | #define CRONTABS CONFIG_FEATURE_CROND_DIR "/crontabs" |
28 | #endif | ||
29 | #ifndef TMPDIR | ||
30 | #define TMPDIR "/var/spool/cron" | ||
31 | #endif | ||
32 | #ifndef SENDMAIL | 28 | #ifndef SENDMAIL |
33 | #define SENDMAIL "sendmail" | 29 | #define SENDMAIL "sendmail" |
34 | #endif | 30 | #endif |
diff --git a/miscutils/crontab.c b/miscutils/crontab.c index 13dfd77ad..34b80ea37 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c | |||
@@ -12,9 +12,7 @@ | |||
12 | 12 | ||
13 | #include "libbb.h" | 13 | #include "libbb.h" |
14 | 14 | ||
15 | #ifndef CRONTABS | 15 | #define CRONTABS CONFIG_FEATURE_CROND_DIR "/crontabs" |
16 | #define CRONTABS "/var/spool/cron/crontabs" | ||
17 | #endif | ||
18 | #ifndef CRONUPDATE | 16 | #ifndef CRONUPDATE |
19 | #define CRONUPDATE "cron.update" | 17 | #define CRONUPDATE "cron.update" |
20 | #endif | 18 | #endif |