Last active
July 31, 2018 04:33
-
-
Save henriqueutsch/f43de34f1196e30dfded7aa79f78bb36 to your computer and use it in GitHub Desktop.
Mount Driver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#sudo nano /etc/init.d/mountdrivers.sh | |
if [[ ! -z `mount | grep "on /media/TimeMachine type hfsplus (ro,"` ]] | |
then | |
echo "Reparando disco /media/TimeMachine em /dev/sda1" | |
sudo umount -l /dev/sda1 | |
sudo fsck.hfsplus -drfy /dev/sda1 | |
sudo mount -a | |
echo `mount | grep "on /media/TimeMachine type hfsplus (rw,"` | |
else | |
echo "Drive /media/TimeMachine montado corretamente" | |
fi | |
if [[ ! -z `mount | grep "on /media/Backup type hfsplus (ro,"` ]] | |
then | |
echo "Reparando disco /media/Backup em /dev/sda2" | |
sudo umount -l /dev/sda2 | |
sudo fsck.hfsplus -drfy /dev/sda2 | |
sudo mount -a | |
echo `mount | grep "on /media/Backup type hfsplus (rw,"` | |
else | |
echo "Drive /media/Backup montado corretamente" | |
fi | |
if [[ ! -z `mount | grep "on /media/Drive5T type hfsplus (ro,"` ]] | |
then | |
echo "Reparando disco /media/Drive5T em /dev/sdb2" | |
sudo umount -l /dev/sdb2 | |
sudo fsck.hfsplus -drfy /dev/sdb2 | |
sudo mount -a | |
echo `mount | grep "on /media/Drive5T type hfsplus (ro,"` | |
else | |
echo "Drive /media/Drive5T montado corretamente" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#sudo chmod +x /etc/init.d/mountdrivers.sh | |
#sudo crontab -e | |
[@root](http://twitter.com/root) /etc/init.d/mountdriver.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment