cat $tmp >$mnt/btrfs-dev-stats
fi
fi
+ rm -f $tmp
if ! $idle; then
if $dryrun; then
# the wiki recommends 30 days or so, but
# it makes the comp lag like shit for a day,
# so I'm going with 90 days.
- if (( date > $(date +%s) - 60*60*24*30 )); then
+ if (( date > EPOCHSECONDS - 60*60*24*30 )); then
if $dryrun; then
- echo "$0: skiping scrub of $mnt, last was $(( ($(date +%s) - date) / 60/60/24 )) days ago, < 30 days"
+ echo "$0: skiping scrub of $mnt, last was $(( (EPOCHSECONDS - date) / 60/60/24 )) days ago, < 30 days"
fi
continue
fi