I use this piece of bash script when booting to make sure /tmp is empty before mounting it.
#
# Make sure /tmp is empty.
#
cd /tmp
ANSWER=$(/usr/bin/ls -A | /usr/bin/cut -b 1)
if [ ! -z $ANSWER ]; then
/usr/bin/rm -rf *
/usr/bin/sync
fi
If anything exists in /tmp, other than . and...