Initial import from FreeBSD RELENG_4:
[games.git] / etc / periodic / daily / 320.rdist
1 #!/bin/sh
2 #
3 # $FreeBSD: src/etc/periodic/daily/320.rdist,v 1.3.2.2 2000/09/20 02:46:15 jkh Exp $
4 #
5
6 # If there is a global system configuration file, suck it in.
7 #
8 if [ -r /etc/defaults/periodic.conf ]
9 then
10     . /etc/defaults/periodic.conf
11     source_periodic_confs
12 fi
13
14 case "$daily_distfile_enable" in
15     [Yy][Ee][Ss])
16         if [ ! -f /etc/Distfile ]
17         then
18             echo '$daily_distfile_enable is set but /etc/Distfile' \
19                 "doesn't exist"
20             rc=2
21         else
22             echo ""
23             echo "Running rdist with /etc/Distfile:"
24
25             rdist -f /etc/Distfile && rc=0 || rc=3
26         fi;;
27
28     *)  rc=0;;
29 esac
30
31 exit $rc