pingしてからsmbmountすればもっと早くできると思う
こんな感じ
#!/bin/bash
TargetIP=192.168.0.2
ping -c 1 -w 1 $TargetIP > /dev/null || exit 0
mount //$TargetIP/hoge /var/windows/ -o sec=none > /dev/null 2>&1
if [ $? -eq 0 ]
then
rsync -a --delete /var/windows/ /var/samba/foo/
umount /var/windows/ || exit 1
else
exit 0
fi
exit