xref: /freebsd/usr.sbin/periodic/etc/daily/999.local (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
1#!/bin/sh
2#
3#
4# Run the old /etc/daily.local script.  This is really for backwards
5# compatibility more than anything else.
6#
7
8# If there is a global system configuration file, suck it in.
9#
10if [ -r /etc/defaults/periodic.conf ]
11then
12    . /etc/defaults/periodic.conf
13    source_periodic_confs
14fi
15
16rc=0
17for script in $daily_local
18do
19    echo ''
20    case "$script" in
21	/*)
22	    if [ -x "$script" ]
23	    then
24		echo "Running $script:"
25
26		$script || rc=3
27	    elif [ -f "$script" ]
28	    then
29		echo "Running $script:"
30
31		sh $script || rc=3
32	    else
33		echo "$script: No such file"
34		[ $rc -lt 2 ] && rc=2
35	    fi;;
36	*)
37	    echo "$script: Not an absolute path"
38	    [ $rc -lt 2 ] && rc=2;;
39    esac
40done
41
42exit $rc
43