mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 04:43:32 +00:00
This is Vixie cron 3.0. This version fixes all known security bugs.
Further it implements crontab -e. I moved cron from /usr/libexec to /usr/sbin where most daemons are that are run from rc. That also gets rid of the ugly path crond used to have in ps(1) outputs. Further I renamed it to cron, as Paul Vixie likes it and is done by NetBSD. NOTE VERY WELL THE FOLLOWING: 1) Systems crontab changed. Every users crontab resides in /var/cron *EXCEPT* root's. This is a special crontab as it resides in /etc. Further it is the *ONLY* crontab file in which you specify usernames. See /usr/src/etc/crontab. This is also done by BSDI's BSD/386 as far as I know (they provided the patches for it anyway) 2) So you *must* delete root's crontab and reinstall the copy in /etc from /usr/src/etc. 'Must' is to much: the old installed crontab will work but cron will also try to 'run' /etc/crontab. 3) Last but not least: cron's logging is now done via syslog. Note that logging by cron is done lowercase when it logs about itsself and uppercase when it logs user events, like installing a new crontab. The default logfile file is the same as before: syslog.conf:cron.* /var/cron/log -Guido
This commit is contained in:
parent
3926f9e8f3
commit
3b15f669f7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1001
16
etc/crontab
16
etc/crontab
@ -1,25 +1,25 @@
|
|||||||
# /var/cron/tabs/root - root's crontab for FreeBSD
|
# /var/cron/tabs/root - root's crontab for FreeBSD
|
||||||
#
|
#
|
||||||
# $Id: crontab,v 1.3 1994/01/04 17:50:25 ache Exp $
|
# $Id: crontab,v 1.4 1994/01/08 15:07:43 ache Exp $
|
||||||
# From: Id: crontab,v 1.6 1993/05/31 02:03:57 cgd Exp
|
# From: Id: crontab,v 1.6 1993/05/31 02:03:57 cgd Exp
|
||||||
#
|
#
|
||||||
SHELL=/bin/sh
|
SHELL=/bin/sh
|
||||||
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
|
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
|
||||||
HOME=/var/log
|
HOME=/var/log
|
||||||
#
|
#
|
||||||
#minute hour mday month wday command
|
#minute hour mday month wday who command
|
||||||
#
|
#
|
||||||
0/5 * * * * /usr/libexec/atrun
|
0/5 * * * * root /usr/libexec/atrun
|
||||||
#
|
#
|
||||||
# rotate log files every hour, if necessary
|
# rotate log files every hour, if necessary
|
||||||
#0 * * * * /usr/bin/newsyslog
|
#0 * * * * root /usr/bin/newsyslog
|
||||||
#
|
#
|
||||||
# do daily/weekly/monthly maintenance
|
# do daily/weekly/monthly maintenance
|
||||||
0 2 * * * /etc/daily
|
0 2 * * * root /etc/daily
|
||||||
30 3 * * 6 /etc/weekly
|
30 3 * * 6 root /etc/weekly
|
||||||
30 5 1 * * /etc/monthly
|
30 5 1 * * root /etc/monthly
|
||||||
#
|
#
|
||||||
# time zone change adjustment for wall cmos clock,
|
# time zone change adjustment for wall cmos clock,
|
||||||
# does nothing, if you have UTC cmos clock.
|
# does nothing, if you have UTC cmos clock.
|
||||||
# See adjkerntz(8) for details.
|
# See adjkerntz(8) for details.
|
||||||
0 3 * * * /sbin/adjkerntz -a
|
0 3 * * * root /sbin/adjkerntz -a
|
||||||
|
4
etc/rc
4
etc/rc
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# $Id: rc,v 1.13 1994/01/04 18:06:18 ache Exp $
|
# $Id: rc,v 1.14 1994/01/08 17:49:47 ache Exp $
|
||||||
# From: @(#)rc 5.27 (Berkeley) 6/5/91
|
# From: @(#)rc 5.27 (Berkeley) 6/5/91
|
||||||
|
|
||||||
# System startup script run by init on autoboot
|
# System startup script run by init on autoboot
|
||||||
@ -142,7 +142,7 @@ echo clearing /tmp
|
|||||||
# echo 'turning on accounting'; accton /var/account/acct
|
# echo 'turning on accounting'; accton /var/account/acct
|
||||||
|
|
||||||
echo -n standard daemons:
|
echo -n standard daemons:
|
||||||
echo -n ' crond'; /usr/libexec/crond
|
echo -n ' cron'; cron
|
||||||
echo '.'
|
echo '.'
|
||||||
|
|
||||||
echo -n starting network daemons:
|
echo -n starting network daemons:
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
*.notice;kern.debug;lpr,auth.info;mail.crit /var/log/messages
|
*.notice;kern.debug;lpr,auth.info;mail.crit /var/log/messages
|
||||||
mail.info /var/log/maillog
|
mail.info /var/log/maillog
|
||||||
lpr.info /var/log/lpd-errs
|
lpr.info /var/log/lpd-errs
|
||||||
|
cron.* /var/cron/log
|
||||||
*.err root
|
*.err root
|
||||||
*.notice;auth.debug root
|
*.notice;auth.debug root
|
||||||
*.alert root
|
*.alert root
|
||||||
|
Loading…
Reference in New Issue
Block a user