virtio - fix contigmalloc muff last commit
[dragonfly.git] / etc / periodic / daily / 130.clean-msgs
blobb30b86c6bb5349818ed1ebb80c47be3991e2cfa8
1 #!/bin/sh
3 # $FreeBSD: src/etc/periodic/daily/130.clean-msgs,v 1.3.2.2 2000/09/20 02:46:15 jkh Exp $
4 # $DragonFly: src/etc/periodic/daily/130.clean-msgs,v 1.2 2003/06/17 04:24:48 dillon Exp $
6 # Remove system messages
9 # If there is a global system configuration file, suck it in.
11 if [ -r /etc/defaults/periodic.conf ]
12 then
13 . /etc/defaults/periodic.conf
14 source_periodic_confs
17 case "$daily_clean_msgs_enable" in
18 [Yy][Ee][Ss])
19 if [ ! -d /var/msgs ]
20 then
21 echo '$daily_clean_msgs_enable is set but /var/msgs' \
22 "doesn't exist"
23 rc=2
24 else
25 echo ""
26 echo "Cleaning out old system announcements:"
28 [ -n "$daily_clean_msgs_days" ] &&
29 arg=-${daily_clean_msgs_days#-} || arg=
30 msgs -c $arg && rc=0 || rc=3
31 fi;;
33 *) rc=0;;
34 esac
36 exit $rc