diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-02-04 02:59:41 +0300 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-02-04 02:59:41 +0300 |
commit | ded5dfef6ef7df76fc54335b29ae4c214026dc1f (patch) | |
tree | 50e1f903ee48bebc050f70dec8e230d6d448ec0b | |
parent | d814c986929b0f8deba5a733250c3f59d7678277 (diff) |
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 help Support calling /usr/sbin/sendmail for send cmd outputs. +config FEATURE_CROND_DIR + string "crond spool directory" + default "/var/spool/cron" + depends on CROND || CRONTAB + help + Location of crond spool. + config CRONTAB bool "crontab" 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 @@ #endif -#ifndef CRONTABS -#define CRONTABS "/var/spool/cron/crontabs" -#endif -#ifndef TMPDIR -#define TMPDIR "/var/spool/cron" -#endif +#define TMPDIR CONFIG_FEATURE_CROND_DIR +#define CRONTABS CONFIG_FEATURE_CROND_DIR "/crontabs" #ifndef SENDMAIL #define SENDMAIL "sendmail" #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 @@ #include "libbb.h" -#ifndef CRONTABS -#define CRONTABS "/var/spool/cron/crontabs" -#endif +#define CRONTABS CONFIG_FEATURE_CROND_DIR "/crontabs" #ifndef CRONUPDATE #define CRONUPDATE "cron.update" #endif |