From owner-svn-src-head@freebsd.org Thu May 18 06:33:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 854AFD72E80; Thu, 18 May 2017 06:33:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D3F41C6F; Thu, 18 May 2017 06:33:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I6Xuis066436; Thu, 18 May 2017 06:33:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I6Xt1g066432; Thu, 18 May 2017 06:33:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705180633.v4I6Xt1g066432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 18 May 2017 06:33:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318443 - in head/etc: . cron.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 06:33:57 -0000 Author: ngie Date: Thu May 18 06:33:55 2017 New Revision: 318443 URL: https://svnweb.freebsd.org/changeset/base/318443 Log: Conditionally handle the crontab entry for atrun(8) The default crontab prior to this commit assumes atrun(8) is always present, which isn't true if MK_AT == no. Move atrun(8) execution from /etc/crontab to /etc/cron.d/at, and base /etc/cron.d/at's installation on MK_AT. cron(8) will detect /etc/cron.d/at's presence when the configuration is loaded and run atrun every 5 minutes like it would 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 set in the current default /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 Added: head/etc/cron.d/ head/etc/cron.d/Makefile (contents, props changed) head/etc/cron.d/at (contents, props changed) Modified: head/etc/Makefile head/etc/crontab Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu May 18 06:27:37 2017 (r318442) +++ head/etc/Makefile Thu May 18 06:33:55 2017 (r318443) @@ -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 Added: head/etc/cron.d/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/cron.d/Makefile Thu May 18 06:33:55 2017 (r318443) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +.include + +.if ${MK_AT} != "no" +FILES+= at +.endif + +BINDIR= /etc/cron.d + +.include Added: head/etc/cron.d/at ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/cron.d/at Thu May 18 06:33:55 2017 (r318443) @@ -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 Modified: head/etc/crontab ============================================================================== --- head/etc/crontab Thu May 18 06:27:37 2017 (r318442) +++ head/etc/crontab Thu May 18 06:33:55 2017 (r318443) @@ -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 #