[net.bugs.4bsd] cd /usr/adm; if [ ! -r msgbuf ] ; then echo "messages cancerous"; fi

ado@elsie.UUCP (Arthur David Olson) (01/08/85)

Index:		/usr/adm/m*	[4.?bsd]

Description:	If "/etc/dmesg" is run by "cron" and the file "/usr/adm/msgbuf"
		is missing, the file "/usr/adm/messages" grows rapidly (and
		erroneously).

Repeat-by:	Removing "/usr/adm/msgbuf" and waiting a day.  (Note well: I
		advise taking my word for it rather than doing this.)

Diagnosis:	"/etc/dmesg" fails to check to see if "/usr/adm/msgbuf" exists.

Fix:		The real fix is to correct "/etc/dmesg".  Here's the universal
		fix, though--one that can be applied even if you have a binary-
		only license.

		If your "/usr/lib/crontab" file has a line like

		    0,10,20,30,40,50 * * * * /etc/dmesg - >>/usr/adm/messages

		then add a line like

		    8,18,28,38,48,58 * * * * touch /usr/adm/msgbuf

		You can schedule the "touch" command less frequently if you
		like, at the cost of some spurious output in "/usr/adm/messages"
		if "msgbuf" ever disappears.
--
	..decvax!seismo!elsie!ado	(country code 1)(301) 496-5688
	DEC, VAX and Elsie are Digital Equipment and Borden trademarks