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