Initial import from FreeBSD RELENG_4:
[games.git] / etc / periodic / daily / 999.local
1 #!/bin/sh
2 #
3 # $FreeBSD: src/etc/periodic/daily/999.local,v 1.2.2.3 2001/08/01 20:38:03 obrien Exp $
4 #
5 # Run the old /etc/daily.local script.  This is really for backwards
6 # compatibility more than anything else.
7 #
8
9 # If there is a global system configuration file, suck it in.
10 #
11 if [ -r /etc/defaults/periodic.conf ]
12 then
13     . /etc/defaults/periodic.conf
14     source_periodic_confs
15 fi
16
17 rc=0
18 for script in $daily_local
19 do
20     echo ''
21     case "$script" in
22         /*)
23             if [ -f "$script" ]
24             then
25                 echo "Running $script:"
26
27                 sh $script || rc=3
28             else
29                 echo "$script: No such file"
30                 [ $rc -lt 2 ] && rc=2
31             fi;;
32         *)
33             echo "$script: Not an absolute path"
34             [ $rc -lt 2 ] && rc=2;;
35     esac
36 done
37
38 exit $rc