summaryrefslogtreecommitdiffstats
path: root/etc/periodic/daily/999.local
blob: 317347526e7952b7fe331701b30481c2c595f684 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
#
# $FreeBSD$
#
# Run the old /etc/daily.local script.  This is really for backwards
# compatibility more than anything else.
#

# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/periodic.conf ]
then
    . /etc/defaults/periodic.conf
    source_periodic_confs
fi

rc=0
for script in $daily_local
do
    echo ''
    case "$script" in
	/*)
	    if [ -f "$script" ]
	    then
		echo "Running $script:"

		sh $script || rc=3
	    else
		echo "$script: No such file"
		[ $rc -lt 2 ] && rc=2
	    fi;;
	*)
	    echo "$script: Not an absolute path"
	    [ $rc -lt 2 ] && rc=2;;
    esac
done

exit $rc
OpenPOWER on IntegriCloud