From owner-freebsd-stable@FreeBSD.ORG Sun Jun 8 07:31:19 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6432537B405 for ; Sun, 8 Jun 2003 07:31:18 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 026CE43F3F for ; Sun, 8 Jun 2003 07:31:13 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h58ETdE6091393 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 Jun 2003 15:31:00 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)h58ETdoq091392; Sun, 8 Jun 2003 15:29:39 +0100 (BST) (envelope-from matthew) Date: Sun, 8 Jun 2003 15:29:39 +0100 From: Matthew Seaman To: Santos Message-ID: <20030608142939.GA91073@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Santos , freebsd-stable@freebsd.org References: <3EE327E4.1040304@cas.port995.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: <3EE327E4.1040304@cas.port995.com> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-7.5 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE_2, QUOTED_EMAIL_TEXT,REFERENCES,REPLY_WITH_QUOTES, USER_AGENT_MUTT version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: freebsd-stable@freebsd.org Subject: Re: Periodic scripts X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2003 14:31:19 -0000 --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 08, 2003 at 01:11:16PM +0100, Santos wrote: > Why there is a weekly script that rebuilds the locate database when: >=20 > >>> WARNING > >>> Executing updatedb as root. This WILL reveal all filenames > >>> on your machine to all login users, which is a security risk. >=20 >=20 > Is there a way to put dates on the periodic scripts report output for=20 > those who redirect the reports to files instead of mail messages? There= =20 > is no easy way to tell what date a report belongs to. Create a 'timestamp' periodic job, which does nothing except print out the date at which it is invoked. Save this as, say, /etc/periodic/daily/000.timestamp to ensure that it gets run as the first job. The timestamp script should return exit code 1 to ensure that the periodic script knowns it has produced output that should be included in the report: #!/bin/sh # # Emit timestamp at start of daily periodic run date +"Daily run started at %H:%M %p %Z on %d/%m/%Y" exit 1 Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --wac7ysb48OaltWcw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE+40hTdtESqEQa7a0RAgC9AJ9uo1pwU+cLBvNfaGeLyUJaNY2ReQCfc+Hs WOEYbMMTYWe1M0Hpw9qqe2Q= =/xlm -----END PGP SIGNATURE----- --wac7ysb48OaltWcw--