Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / etc / periodic / daily / 340.uucp
1 #!/bin/sh
2 #
3 # $FreeBSD: src/etc/periodic/daily/340.uucp,v 1.4.2.2 2000/09/20 02:46:15 jkh Exp $
4 # $DragonFly: src/etc/periodic/daily/Attic/340.uucp,v 1.2 2003/06/17 04:24:48 dillon Exp $
5 #
6 # Local cleanup of UUCP files.  This is for backwards compatibility,
7 # /etc/uuclean.daily doesn't exist by default.
8 #
9
10 # If there is a global system configuration file, suck it in.
11 #
12 if [ -r /etc/defaults/periodic.conf ]
13 then
14     . /etc/defaults/periodic.conf
15     source_periodic_confs
16 fi
17
18 case "$daily_uuclean_enable" in
19     [Yy][Ee][Ss])
20         if [ ! -d /var/spool/uucp ]
21         then
22             echo '$daily_uuclean_enable is set, but /var/spool/uucp' \
23                 "doesn't exist"
24             rc=2
25         elif [ ! -f /etc/uuclean.daily ]
26         then
27             echo '$daily_uuclean_enable is set, but /etc/uuclean.daily' \
28                 "doesn't exist"
29             rc=2
30         else
31             echo ""
32             echo "Cleaning up UUCP:"
33
34             echo /etc/uuclean.daily | su -m uucp && rc=0 || rc=3
35         fi;;
36
37     *)  rc=0;;
38 esac
39
40 exit $rc