Handle the cron.d entry for MK_AT in cron conditionally
Install /etc/cron.d/at if MK_AT != no, always using it, which tries to run a non-existent program via cron(8) every 5 minutes with the default /etc/crontab, prior to this commit. SHELL and PATH are duplicated between /etc/crontab and /etc/cron.d/at because atrun(8) executes programs, which may rely on environment currently set via /etc/crontab. Noted by: bdrewery (in an internal review) MFC after: 2 months Relnotes: yes (may need to add environmental modifications to /etc/cron.d/at) Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
5c63f26129
commit
94af8db1e9
@ -8,6 +8,7 @@ FILESGROUPS= FILES
|
||||
# No need as it is empty and just causes rebuilds since this file does so much.
|
||||
UPDATE_DEPENDFILE= no
|
||||
SUBDIR= \
|
||||
cron.d \
|
||||
newsyslog.conf.d \
|
||||
syslog.d
|
||||
|
||||
|
11
etc/cron.d/Makefile
Normal file
11
etc/cron.d/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
.if ${MK_AT} != "no"
|
||||
FILES+= at
|
||||
.endif
|
||||
|
||||
BINDIR= /etc/cron.d
|
||||
|
||||
.include <bsd.prog.mk>
|
7
etc/cron.d/at
Normal file
7
etc/cron.d/at
Normal file
@ -0,0 +1,7 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
SHELL=/bin/sh
|
||||
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
|
||||
|
||||
# See crontab(5) for field format.
|
||||
*/5 * * * * root /usr/libexec/atrun
|
@ -7,8 +7,6 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
|
||||
#
|
||||
#minute hour mday month wday who command
|
||||
#
|
||||
*/5 * * * * root /usr/libexec/atrun
|
||||
#
|
||||
# Save some entropy so that /dev/random can re-seed on boot.
|
||||
*/11 * * * * operator /usr/libexec/save-entropy
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user