sysutils/syslog-ng/files/ patch

Brian A. Seklecki lavalamp at
Sat Nov 4 02:32:08 UTC 2006

This is a nice little patch we use to purge out /dev/klog after 
/etc/rc.d/dmesg and before /usr/local/etc/rc.d/

It's useful for shops that translate facility/priority syslog 
messages into SMS/E-Mail via a log{} mechanism (i.e., hardware error 
messages from the kernel, like some flunky in the NOC plugging a keyboard 
into your system).

It lets you avoid 200 lines of boot messages in log(9) making their way 
into your log{} mechanism or into your pager.

We want to feed it upstream because we think others will find it useful.


$ diff -u /usr/ports/sysutils/syslog-ng/files/

--- /usr/ports/sysutils/syslog-ng/files/ Wed Mar 29 
16:20:19 2006
+++     Fri Nov  3 20:32:59 2006
@@ -14,6 +14,8 @@

  . %%RC_SUBR%%

@@ -23,6 +25,11 @@
+if checkyesno syslog_ng_purgeklog; then
+        start_precmd="echo \"Purging klog(9)\" && sysctl -w 
kern.msgbuf_clear=1 $start_precmd";

  load_rc_config $name


 	-lava (Brian A. Seklecki - Pittsburgh, PA, USA)

"...from back in the heady days when "helpdesk" meant nothing, "diskquota"
meant everything, and lives could be bought and sold for a couple of pages
of laser printout - and frequently were."

More information about the freebsd-ports mailing list