1254974Sjlh#!/bin/sh
2254974Sjlh#
3254974Sjlh# $FreeBSD: releng/11.0/etc/periodic/weekly/450.status-security 254974 2013-08-27 21:20:28Z jlh $
4254974Sjlh#
5254974Sjlh
6254974Sjlh# If there is a global system configuration file, suck it in.
7254974Sjlh#
8254974Sjlhif [ -r /etc/defaults/periodic.conf ]
9254974Sjlhthen
10254974Sjlh    . /etc/defaults/periodic.conf
11254974Sjlh    source_periodic_confs
12254974Sjlhfi
13254974Sjlh
14254974Sjlhcase "$weekly_status_security_enable" in
15254974Sjlh    [Yy][Ee][Ss])
16254974Sjlh	echo ""
17254974Sjlh	echo "Security check:"
18254974Sjlh
19254974Sjlh	case "$weekly_status_security_inline" in
20254974Sjlh	    [Yy][Ee][Ss])
21254974Sjlh		weekly_status_security_output="";;
22254974Sjlh	esac
23254974Sjlh
24254974Sjlh	export security_output="${weekly_status_security_output}"
25254974Sjlh	case "${weekly_status_security_output}" in
26254974Sjlh	    "")
27254974Sjlh		rc=3;;
28254974Sjlh	    /*)
29254974Sjlh		echo "    (output logged separately)"
30254974Sjlh		rc=0;;
31254974Sjlh	    *)
32254974Sjlh		echo "    (output mailed separately)"
33254974Sjlh		rc=0;;
34254974Sjlh	esac
35254974Sjlh
36254974Sjlh	periodic security || rc=3;;
37254974Sjlh
38254974Sjlh    *)  rc=0;;
39254974Sjlhesac
40254974Sjlh
41254974Sjlhexit $rc
42