fi ]
)
+AC_ARG_WITH(syscrontab,
+ [AS_HELP_STRING([--with-syscrontab], [Build cronie with syscrontab enabled.])],
+ [ if test "x$withval" != xno; then
+ AC_DEFINE(WITH_SYSCRONTAB,1,[Define if you want syscrontab.])
+ fi ]
+)
+
dnl CRONIE_VAR_DEFAULT (VAR, DESCRIPTION, DEFAULT)
dnl --------------------------------------------
AC_DEFUN([CRONIE_CONF_VAR],
* clustering enabled.
*/
-# define NUM_WATCHES 3
+# if defined WITH_SYSCRONTAB
+# define NUM_WATCHES 3
int wd[NUM_WATCHES];
const char *watchpaths[NUM_WATCHES] = {SPOOL_DIR, SYS_CROND_DIR, SYSCRONTAB};
+# else
+# define NUM_WATCHES 2
+int wd[NUM_WATCHES];
+const char *watchpaths[NUM_WATCHES] = {SPOOL_DIR, SYS_CROND_DIR};
+# endif
static void reset_watches(void) {
int i;
set_cron_watched(old_db->ifd);
/* TODO: parse the events and read only affected files */
-
+#if defined WITH_SYSCRONTAB
process_crontab("root", NULL, SYSCRONTAB, &new_db, old_db);
+#endif
if (!(dir = opendir(SYS_CROND_DIR))) {
log_it("CRON", pid, "OPENDIR FAILED", SYS_CROND_DIR, errno);
max_mtime(SYS_CROND_DIR, &crond_stat);
}
+#if defined WITH_SYSCRONTAB
/* track system crontab file
*/
if (stat(SYSCRONTAB, &syscron_stat) < OK)
syscron_stat.st_mtime = 0;
+#endif
/* if spooldir's mtime has not changed, we don't need to fiddle with
* the database.
new_db.ifd = old_db->ifd;
#endif
+#if defined WITH_SYSCRONTAB
if (syscron_stat.st_mtime)
process_crontab("root", NULL, SYSCRONTAB, &new_db, old_db);
+#endif
if (!(dir = opendir(SYS_CROND_DIR))) {
log_it("CRON", pid, "OPENDIR FAILED", SYS_CROND_DIR, errno);