* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: config.h.in,v 1.14 2000-08-29 18:01:39 thib Exp $ */
+ /* $Id: config.h.in,v 1.15 2000-09-04 13:08:15 thib Exp $ */
/* *********************************************************** */
/* (they are overridden by Makefile's value ) */
#ifndef VERSION
-#define VERSION "1.0.0" /* default version if not defined in Makefile */
+#define VERSION "1.0.0" /* default version if not defined in Makefile */
+#endif
+
+#ifndef SENDMAIL /* mail command location */
+#define SENDMAIL "/usr/lib/sendmail"
#endif
#ifndef FCRONTABS /* directory where is stored users' fcrontabs */
#define ETC "/etc/"
#endif
+#ifndef PROC_LOADAVG /* do we have a mounted procfs with loadavg file on
+ * this system ? */
+#define PROC_LOADAVG 1
+#endif
+
#ifndef PROC /* directory where is mounted the procfs */
#define PROC "/proc/"
#endif
#define FCRON_DENY "fcron.deny"
-#define SENDMAIL "/usr/lib/sendmail" /* mail command */
-
#define SENDMAIL_ARGS "-Ffcron", "-odi" /* args of mail command */
#define EDITOR "/usr/bin/vi" /* default editor */
* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: database.c,v 1.22 2000-09-03 19:03:10 thib Exp $ */
+ /* $Id: database.c,v 1.23 2000-09-04 13:10:13 thib Exp $ */
#include "fcron.h"
* and return the time to sleep */
{
time_t tts = time_to_sleep(lim);
+
+#if PROC_LOADAVG == 0
+ while ( lavg_num > 0 )
+ run_lavg_job(0);
+ return tts;
+#endif /* PROC_LOADAVG = 0 */
+
register int i = 0;
short int l_avg[3];
* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: fileconf.c,v 1.15 2000-08-29 18:03:03 thib Exp $ */
+ /* $Id: fileconf.c,v 1.16 2000-09-04 13:09:21 thib Exp $ */
#include "fcrontab.h"
Handle_err;
cl->cl_lavg[2] = i;
set_lavg(cl->cl_option);
+#if PROC_LOADAVG == 0
+ warn("As fcron has been compiled with no procfs support,\n"
+ "you will not be able to use the lavg* options");
+#endif /* PROC_LOADAVG = 0 */
if (debug_opt)
fprintf(stderr, " Opt : 'lavg15' %d\n", i);
}
Handle_err;
cl->cl_lavg[0] = i;
set_lavg(cl->cl_option);
+#if PROC_LOADAVG == 0
+ warn("As fcron has been compiled with no procfs support,\n"
+ "you will not be able to use the lavg* options");
+#endif /* PROC_LOADAVG = 0 */
if (debug_opt)
fprintf(stderr, " Opt : 'lavg1' %d\n", i);
}
Handle_err;
cl->cl_lavg[1] = i;
set_lavg(cl->cl_option);
+#if PROC_LOADAVG == 0
+ warn("As fcron has been compiled with no procfs support,\n"
+ "you will not be able to use the lavg* options");
+#endif /* PROC_LOADAVG = 0 */
if (debug_opt)
fprintf(stderr, " Opt : 'lavg5' %d\n", i);
}
Handle_err;
cl->cl_lavg[2] = i;
set_lavg(cl->cl_option);
+#if PROC_LOADAVG == 0
+ warn("As fcron has been compiled with no procfs support,\n"
+ "you will not be able to use the lavg* options");
+#endif /* PROC_LOADAVG = 0 */
if (debug_opt)
fprintf(stderr, " Opt : 'lavg15' %d\n", i);
}