xref: /freebsd/usr.sbin/periodic/etc/daily/300.calendar (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1#!/bin/sh
2#
3# $FreeBSD$
4#
5# `calendar -a' needs to die. Why? Because it's a bad idea, particular
6# with networked home directories, but also in general.  If you want the
7# output of `calendar' mailed to you, set up a cron job to do it,
8# or run it from your ~/.profile or ~/.login.
9#
10
11# If there is a global system configuration file, suck it in.
12#
13if [ -r /etc/defaults/periodic.conf ]
14then
15    . /etc/defaults/periodic.conf
16    source_periodic_confs
17fi
18
19case "$daily_calendar_enable" in
20    [Yy][Ee][Ss])
21	echo ""
22	echo "Running calendar:"
23
24	calendar -a && rc=0 || rc=3;;
25
26    *)  rc=0;;
27esac
28
29exit $rc
30