Enviado em 17/10/2010 - 21:42h
Estou tentando checar se o drive esta montado
mount -t vfat /dev/sdb1 /mnt/pendrive
montado='mount | grep /mnt/pendrive'
if [ -z "$montado" ]; then
exit 2
else
#DATA='date +%Y-%m-%d-%H.%M'
# Backup meus dados relevantes
rsync -Cravzp /home/arquivos /mnt/pendrive
umount /mnt/pendrive
fi
estando montado ou não ele vai pro else
mount -t vfat /dev/sdb1 /mnt/pendrive
montado='mount | grep /mnt/pendrive'
if [ -z "$montado" ]; then
exit 2
else
#DATA='date +%Y-%m-%d-%H.%M'
# Backup meus dados relevantes
rsync -Cravzp /home/arquivos /mnt/pendrive
umount /mnt/pendrive
fi
estando montado ou não ele vai pro else