periodic - Adjust daily 160 and 161 (hammer and hammer2 cleanup)
[dragonfly.git] / etc / periodic / daily / 161.clean-hammer2
blob8bc027d6a72e396b9a8f5e3b8b0127c907b1c100
1 #!/bin/sh
3 # cleanup pass on all mounted hammer2 filesystems
5 # If there is a global system configuration file, suck it in.
7 if [ -r /etc/defaults/periodic.conf ]
8 then
9 . /etc/defaults/periodic.conf
10 source_periodic_confs
13 case "$daily_clean_hammer2_enable" in
14 [Yy][Ee][Ss])
15 echo ""
16 echo "HAMMER2 maintenance:"
17 case "$daily_clean_hammer2_verbose" in
18 [Yy][Ee][Ss])
19 verbose=-v;;
21 verbose=;;
22 esac
24 /usr/bin/lockf -k -t 0 /var/run/.daily.161.lck \
25 hammer2 $verbose cleanup $daily_clean_hammer2_pfslist && rc=0;;
27 *) rc=0;;
28 esac
30 exit $rc