svn commit: trunk/busybox/miscutils

vda at busybox.net vda at busybox.net
Tue Feb 3 23:59:42 UTC 2009


Author: vda
Date: 2009-02-03 23:59:41 +0000 (Tue, 03 Feb 2009)
New Revision: 25232

Log:
crond,crontab: make cron directory location configurable



Modified:
   trunk/busybox/miscutils/Config.in
   trunk/busybox/miscutils/crond.c
   trunk/busybox/miscutils/crontab.c


Changeset:
Modified: trunk/busybox/miscutils/Config.in
===================================================================
--- trunk/busybox/miscutils/Config.in	2009-02-03 17:39:08 UTC (rev 25231)
+++ trunk/busybox/miscutils/Config.in	2009-02-03 23:59:41 UTC (rev 25232)
@@ -121,6 +121,13 @@
 	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

Modified: trunk/busybox/miscutils/crond.c
===================================================================
--- trunk/busybox/miscutils/crond.c	2009-02-03 17:39:08 UTC (rev 25231)
+++ trunk/busybox/miscutils/crond.c	2009-02-03 23:59:41 UTC (rev 25232)
@@ -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

Modified: trunk/busybox/miscutils/crontab.c
===================================================================
--- trunk/busybox/miscutils/crontab.c	2009-02-03 17:39:08 UTC (rev 25231)
+++ trunk/busybox/miscutils/crontab.c	2009-02-03 23:59:41 UTC (rev 25232)
@@ -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



More information about the busybox-cvs mailing list