1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
#!/bin/sh
set -e
test -z "$CRUFT_ROOT" || exit 0
set -u
if test -e "/var/mail/root"
then
echo "/var/mail/root"
fi
if test -e "/var/spool/cron/crontabs/root"
then
echo "/var/spool/cron/crontabs/root"
fi
awk -F: '{ if ( 1000 <= $3 && $3 < 30000 ) print $1 " " $6}' /etc/passwd | while read -r user home
do
if test -d "$home"
then
echo "$home"
fi
if test -e "/var/mail/$user"
then
echo "/var/mail/$user"
fi
if test -e "/var/spool/cron/crontabs/$user"
then
echo "/var/spool/cron/crontabs/$user"
fi
done
exit 0
|