3 # $FreeBSD: src/etc/periodic/daily/140.clean-rwho,v 1.4.2.2 2000/09/20 02:46:15 jkh Exp $
4 # $DragonFly: src/etc/periodic/daily/140.clean-rwho,v 1.2 2003/06/17 04:24:48 dillon Exp $
6 # Remove stale files in /var/rwho
9 # If there is a global system configuration file, suck it in.
11 if [ -r /etc
/defaults
/periodic.conf
]
13 .
/etc
/defaults
/periodic.conf
17 case "$daily_clean_rwho_enable" in
19 if [ -z "$daily_clean_rwho_days" ]
21 echo '$daily_clean_rwho_enable is enabled but' \
22 '$daily_clean_rwho_days is not set'
24 elif [ ! -d /var
/rwho
]
26 echo '$daily_clean_rwho_enable is enabled but /var/rwho' \
31 echo "Removing stale files from /var/rwho:"
33 case "$daily_clean_rwho_verbose" in
42 rc
=$
(find .
! -name .
-mtime +$daily_clean_rwho_days \
43 -delete $print |
tee /dev
/stderr |
wc -l)
44 [ -z "$print" ] && rc
=0