]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/periodic/etc/daily/999.local
pf tests: Basic test for 'set skip in $groupname'
[FreeBSD/FreeBSD.git] / usr.sbin / periodic / etc / daily / 999.local
1 #!/bin/sh
2 #
3 # $FreeBSD$
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 [ -x "$script" ]
24             then
25                 echo "Running $script:"
26
27                 $script || rc=3
28             elif [ -f "$script" ]
29             then
30                 echo "Running $script:"
31
32                 sh $script || rc=3
33             else
34                 echo "$script: No such file"
35                 [ $rc -lt 2 ] && rc=2
36             fi;;
37         *)
38             echo "$script: Not an absolute path"
39             [ $rc -lt 2 ] && rc=2;;
40     esac
41 done
42
43 exit $rc