Have you tried rewriting your script to sth. like this?
Code:
#!/bin/sh
backup() {
mount /dev/sd1a /mnt/
/usr/local/bin/rsync -avh --exclude-from=/home/stan/rsync.exclude /home/stan /mnt/
/usr/local/bin/rsync -avh /etc /mnt/
/usr/local/bin/rsync -avh /var //mnt/
cd /home/stan/
umount /mnt/
}
backup | mail -s "backup log" root
sleep 5
shutdown -p now
I haven't tested this. But basically this should put the backup routine into a separate function backup() whose output is then mailed (by the backup script not by cron) to root
before shutdown occurs. Optionally you can put a higher value on sleep, just in case, to insure the mail delivery process can complete. Although it's probably not necessary.