Subject: bin/4526: enhancement to /etc/{daily,weekly,monthly,security}
To: None <gnats-bugs@gnats.netbsd.org>
From: None <giles@nemeton.com.au>
List: netbsd-bugs
Date: 11/18/1997 01:29:23
>Number: 4526
>Category: bin
>Synopsis: enhancement to /etc/{daily,weekly,monthly,security}
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Nov 17 17:35:02 1997
>Last-Modified:
>Originator: Giles Lean
>Organization:
Giles Lean <giles@nemeton.com.au> +61 3 9480 2118
Nemeton Pty. Ltd. fax +61 3 9480 1771
PGP Fingerprint (DA68EE41) 9F FB 28 37 81 F2 AC F3 8A B0 37 E5 73 CF 39 E7
>Release: NetBSD-current sup of 17th November 1997
>Environment:
System: NetBSD topaz.nemeton.com.au 1.3_ALPHA NetBSD 1.3_ALPHA (TOPAZ-DISKLESS) #0: Sat Nov 15 09:08:25 EST 1997 giles@topaz.nemeton.com.au:/usr/src/sys/arch/i386/compile/TOPAZ-DISKLESS i386
>Description:
I find it useful to have the date as well as the hostname mailed
in the output of the /etc/{daily,weekly,monthly,security}
scripts.
The presence of the hostname and date means that the message
bodies are never duplicated exactly. (Yeah, I checksum the
bodies of incoming mail items and file duplicates for later
consideration.)
>How-To-Repeat:
>Fix:
Possible patch follows.
*** daily-1.3_ALPHA Tue Nov 18 12:17:35 1997
--- daily Tue Nov 18 12:18:02 1997
***************
*** 6,12 ****
PATH=/bin:/usr/bin:/sbin:/usr/sbin
host=`hostname`
! echo "Subject: $host daily run output"
umask 077
--- 6,13 ----
PATH=/bin:/usr/bin:/sbin:/usr/sbin
host=`hostname`
! date=`date`
! echo "Subject: $host daily run output for $date"
umask 077
*** weekly-1.3_ALPHA Tue Nov 18 12:18:30 1997
--- weekly Tue Nov 18 12:18:45 1997
***************
*** 10,16 ****
umask 077
host=`hostname`
! echo "Subject: $host weekly run output"
if [ -s /etc/weekly.conf ]; then
. /etc/weekly.conf
--- 10,17 ----
umask 077
host=`hostname`
! date=`date`
! echo "Subject: $host weekly run output for $date"
if [ -s /etc/weekly.conf ]; then
. /etc/weekly.conf
*** monthly-1.3_ALPHA Tue Nov 18 12:19:25 1997
--- monthly Tue Nov 18 12:19:40 1997
***************
*** 5,11 ****
#
host=`hostname`
! echo "Subject: $host monthly run output"
umask 077
--- 5,12 ----
#
host=`hostname`
! date=`date`
! echo "Subject: $host monthly run output for $date"
umask 077
*** security-1.3_ALPHA Tue Nov 18 12:21:01 1997
--- security Tue Nov 18 12:22:03 1997
***************
*** 5,10 ****
--- 5,13 ----
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ host=`hostname`
+ date=`date`
+ echo "Subject: $host security run output for $date"
umask 077
>Audit-Trail:
>Unformatted: