700.kernelmsg revision 106987
19313Ssos#!/bin/sh -
29313Ssos#
39313Ssos# Copyright (c) 2001  The FreeBSD Project
49313Ssos# All rights reserved.
59313Ssos#
69313Ssos# Redistribution and use in source and binary forms, with or without
79313Ssos# modification, are permitted provided that the following conditions
89313Ssos# are met:
99313Ssos# 1. Redistributions of source code must retain the above copyright
109313Ssos#    notice, this list of conditions and the following disclaimer.
119313Ssos# 2. Redistributions in binary form must reproduce the above copyright
129313Ssos#    notice, this list of conditions and the following disclaimer in the
139313Ssos#    documentation and/or other materials provided with the distribution.
149313Ssos#
159313Ssos# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
169313Ssos# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
179313Ssos# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
189313Ssos# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
199313Ssos# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
209313Ssos# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
219313Ssos# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
229313Ssos# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
239313Ssos# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
249313Ssos# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
259313Ssos# SUCH DAMAGE.
269313Ssos#
279313Ssos# $FreeBSD: head/etc/periodic/security/700.kernelmsg 106987 2002-11-16 14:57:12Z thomas $
2814381Speter#
299313Ssos
309313Ssos# Show kernel log messages
319313Ssos#
329313Ssos
3312458Sbde# If there is a global system configuration file, suck it in.
349313Ssos#
359313Ssosif [ -r /etc/defaults/periodic.conf ]
369313Ssosthen
379313Ssos    . /etc/defaults/periodic.conf
389313Ssos    source_periodic_confs
399313Ssosfi
4014331Speter
4114331Speter. /etc/periodic/security/security.functions
429313Ssos
439313Ssosrc=0
4414331Speter
4514331Spetercase "$daily_status_security_kernelmsg_enable" in
469313Ssos    [Yy][Ee][Ss])
479313Ssos	dmesg 2>/dev/null |
4814331Speter	    check_diff new_only dmesg - "${host} kernel log messages:"
4914331Speter	rc=$?;;
5014331Speter    *)	rc=0;;
5114331Speteresac
5214331Speter
5314331Speterexit $rc
549313Ssos