Bug 27901

Summary: Add bzip2 hook to newsyslog(8)
Product: Base System Reporter: anders <anders>
Component: binAssignee: David E. O'Brien <obrien>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.3-STABLE   
Hardware: Any   
OS: Any   

Description anders 2001-06-06 07:20:01 UTC
This adds a bzip2 hook to newsyslog(8), to make it possible to have logs
compressed using bzip2. Very useful to keep disk usage down, but:

* Adds a dependancy to the bzip2 port. Which is specified in the man page, so
I guess it's OK since it only uses the binary.
* Uses /usr/local/bin/bzip2 directly. newsyslog will print where it tried to
execute bzip2 from if it fails. I suppose I could add a possibility to override
the path to bzip2 using an environment variable if that was of interest. This
would of course be much easier if bzip2 was in the base system, but I guess
there are reasons not to since it's not there already?

Let me know what you think, and I'll change the patches if improvements are
needed. Both gzip and bzip2 relates to environment variables GZIP and
BZIP/BZIP2 for options respectively (this works with newsyslog too), so I
guess using a BZIP2PATH to override the bzip2 location may be suitable?

Fix: 

In src/usr.sbin: http://home.nuug.no/~anders/newsyslog.diffs
In src/etc: http://home.nuug.no/~anders/newsyslog.conf.diffs
How-To-Repeat: 
	<Code/input/activities to reproduce the problem (multiple lines)>
Comment 1 David E. O'Brien freebsd_committer freebsd_triage 2001-06-21 15:45:11 UTC
Responsible Changed
From-To: freebsd-bugs->obrien
Comment 2 David E. O'Brien freebsd_committer freebsd_triage 2001-07-30 17:27:37 UTC
State Changed
From-To: open->closed

Committed (with tweaks) 
thanks!