Initial import from FreeBSD RELENG_4:
[dragonfly.git] / etc / periodic / weekly / 300.uucp
1 #!/bin/sh -
2 #
3 # $FreeBSD: src/etc/periodic/weekly/300.uucp,v 1.3.2.2 2000/09/20 02:46:17 jkh Exp $
4 #
5 # This is really here for backwards compatibility, clean.weekly is not
6 # created by default anymore.
7
8 # If there is a global system configuration file, suck it in.
9 #
10 if [ -r /etc/defaults/periodic.conf ]
11 then
12     . /etc/defaults/periodic.conf
13     source_periodic_confs
14 fi
15
16 case "$weekly_uucp_enable" in
17     [Yy][Ee][Ss])
18         if [ ! -d /var/spool/uucp ]
19         then
20             echo '$weekly_uucp_enable is set but /var/spool/uucp' \
21                 "doesn't exist"
22             rc=2
23         elif [ ! -x /usr/libexec/uucp/clean.weekly ]
24         then
25             echo '$weekly_uucp_enable is set but' \
26                 "/usr/libexec/uucp/clean.weekly isn't executable"
27             rc=2
28         else
29             echo ""
30             echo "Cleaning up UUCP:"
31
32             echo /usr/libexec/uucp/clean.weekly | su -m daemon && rc=0 || rc=3
33         fi;;
34
35     *)  rc=0;;
36 esac
37
38 exit $rc