From david@catwhisker.org  Sat Apr 13 04:54:18 2002
Return-Path: <david@catwhisker.org>
Received: from bunrab.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122])
	by hub.freebsd.org (Postfix) with ESMTP id EBE8137B400
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 13 Apr 2002 04:54:16 -0700 (PDT)
Received: from d144.catwhisker.org (d144.catwhisker.org [172.16.8.144])
	by bunrab.catwhisker.org (8.12.2/8.12.2) with ESMTP id g3DBsGZG068493
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 13 Apr 2002 04:54:16 -0700 (PDT)
	(envelope-from david@mailhost.catwhisker.org)
Received: from d144.catwhisker.org (localhost [127.0.0.1])
	by d144.catwhisker.org (8.12.2/8.12.2) with ESMTP id g3DBsF7o068758
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 13 Apr 2002 04:54:15 -0700 (PDT)
	(envelope-from david@d144.catwhisker.org)
Received: (from david@localhost)
	by d144.catwhisker.org (8.12.2/8.12.2/Submit) id g3DBsDtx068757;
	Sat, 13 Apr 2002 04:54:13 -0700 (PDT)
Message-Id: <200204131154.g3DBsDtx068757@d144.catwhisker.org>
Date: Sat, 13 Apr 2002 04:54:13 -0700 (PDT)
From: David Wolfskill <david@catwhisker.org>
Reply-To: David Wolfskill <david@catwhisker.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Make "periodic" output show positive "end-of-report" info
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         37036
>Category:       bin
>Synopsis:       Make "periodic" output show positive "end-of-report" info
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    brian
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 13 05:00:06 PDT 2002
>Closed-Date:    Mon May 13 18:18:03 PDT 2002
>Last-Modified:  Mon May 13 18:18:03 PDT 2002
>Originator:     David Wolfskill
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
Wolfskill & Dowling residence
>Environment:
System: FreeBSD d144.catwhisker.org 4.5-STABLE FreeBSD 4.5-STABLE #139: Fri Apr 12 06:07:26 PDT 2002 root@d144.catwhisker.org:/common/S1/obj/usr/src/sys/LAPTOP_30W i386


	Aplies equally well to -CURRENT.
>Description:
	The output from "periodic" is a collection of outputs from a
	variety of individual scripts.  As such, if the output were
	to be truncated for some reason, the recipient of the report
	could well fail to notice this.  While this could well be
	considered the responsibility of the recipient, there is a
	small thing we could do to make the recipient's life a little
	easier:  just add a line to indicate that "this is the end."
>How-To-Repeat:
	Check the output of "periodic".  For example, here's the tail
	end of the "security" output for my build machine:

freebeast.catwhisker.org login failures:

freebeast.catwhisker.org refused connections:


	My laptop, however, has received tghe below patch; here is its
	corresponding output:

d144.catwhisker.org login failures:

d144.catwhisker.org refused connections:

End of output from security


	Note that I'm not trying to do anything fancy here -- no crypto
	hashes, or anything like that.  Just a simple visual confirmation
	that the end of the report didn't drop off into the aether.
>Fix:

	The following works for me.  Please consider it as a suggestion
	-- season to taste:

cvs diff: Diffing usr.sbin/periodic
Index: usr.sbin/periodic/periodic.sh
===================================================================
RCS file: /cvs/freebsd/src/usr.sbin/periodic/periodic.sh,v
retrieving revision 1.9.2.7
diff -u -r1.9.2.7 periodic.sh
--- usr.sbin/periodic/periodic.sh	26 Nov 2000 06:06:18 -0000	1.9.2.7
+++ usr.sbin/periodic/periodic.sh	11 Apr 2002 22:53:57 -0000
@@ -97,6 +97,9 @@
         then
           [ $processed = 1 ] && plural= || plural=s
           echo "No output from the $processed file$plural processed"
+	else
+	  echo ""
+	  echo "End of output from ${arg}"
         fi
     } | eval $pipe
 done
>Release-Note:
>Audit-Trail:

From: Peter Pentchev <roam@ringlet.net>
To: David Wolfskill <david@catwhisker.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: bin/37036: Make "periodic" output show positive "end-of-report" info
Date: Mon, 15 Apr 2002 13:42:28 +0300

 On Sat, Apr 13, 2002 at 04:54:13AM -0700, David Wolfskill wrote:
 > 
 > >Number:         37036
 > >Category:       bin
 > >Synopsis:       Make "periodic" output show positive "end-of-report" info
 > >Originator:     David Wolfskill
 > >Description:
 > 	The output from "periodic" is a collection of outputs from a
 > 	variety of individual scripts.  As such, if the output were
 > 	to be truncated for some reason, the recipient of the report
 > 	could well fail to notice this.  While this could well be
 > 	considered the responsibility of the recipient, there is a
 > 	small thing we could do to make the recipient's life a little
 > 	easier:  just add a line to indicate that "this is the end."
 
 FWIW, I like both the idea and the patch very much!
 
 G'luck,
 Peter
 
 -- 
 Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
 PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
 Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
 Thit sentence is not self-referential because "thit" is not a word.

From: David Wolfskill <david@catwhisker.org>
To: david@catwhisker.org, roam@ringlet.net
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: bin/37036: Make "periodic" output show positive "end-of-report" info
Date: Mon, 15 Apr 2002 04:39:44 -0700 (PDT)

 >Date: Mon, 15 Apr 2002 13:42:28 +0300
 >From: Peter Pentchev <roam@ringlet.net>
 
 >FWIW, I like both the idea and the patch very much!
 
 Thanks for the feedback!  :-)
 
 It had just been one of those "nagging things in the background" that
 bugged me; I finally spent a few minutes to see if I could make the
 situation better.
 
 The implementation could certainly be made more elaborate (complicated),
 but I think that going beyond what I did would get beyond the "point of
 diminishing returns" very quickly.
 
 Cheers,
 david       (links to my resume at http://www.catwhisker.org/~david)
 -- 
 David H. Wolfskill				david@catwhisker.org
 Based on my experience as a computing professional, I consider the use of
 Microsoft products as components of computing systems to be just as
 advisable as using green wood to frame a house... and expect similar results.
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Mon May 13 18:17:04 PDT 2002 
State-Changed-Why:  
I've committed this to -current and will MFC in 1 week (pending re@ approval) 


Responsible-Changed-From-To: freebsd-bugs->brian 
Responsible-Changed-By: brian 
Responsible-Changed-When: Mon May 13 18:17:04 PDT 2002 
Responsible-Changed-Why:  
I've committed this and will MFC in 1 week 

http://www.freebsd.org/cgi/query-pr.cgi?pr=37036 
>Unformatted:
