On Sun, Jun 08, 2003 at 01:11:16PM +0100, Santos wrote:> Why there is a weekly script that rebuilds the locate database when:
>
> >>> WARNING
> >>> Executing updatedb as root. This WILL reveal all filenames
> >>> on your machine to all login users, which is a security risk.
>
>
> Is there a way to put dates on the periodic scripts report output for
> those who redirect the reports to files instead of mail messages? There
> 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
--
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :
http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20030608/704f0e39/attachment.bin