periodic: Sync with FreeBSD current
[dragonfly.git] / etc / periodic / daily / 300.calendar
1 #!/bin/sh
2 #
3 # $FreeBSD: head/etc/periodic/daily/300.calendar 65843 2000-09-14 17:19:15Z brian $
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 #
13 if [ -r /etc/defaults/periodic.conf ]
14 then
15     . /etc/defaults/periodic.conf
16     source_periodic_confs
17 fi
18
19 case "$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;;
27 esac
28
29 exit $rc