Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #######################
- # by Keraxel #
- # http://keraxel.net #
- # License: GNU/GPL v3 #
- #######################
- if [ $1 ]; then
- if [ $1 = "--mount" ] || [ $1 = "-m" ]
- then
- if [ $2 ]
- then
- if [ $2 = "internal" ]
- then
- echo "Mounting internal partition..."
- truecrypt --text --slot=1 --keyfiles=/home/dupa/what3vr.sprld -p "" /dev/sda5 /media/truecrypt1
- elif [ $2 = "external" ]
- then
- echo "Mounting external HDD..."
- truecrypt --text --slot=2 --keyfiles=/home/dupa/what3vr.sprld -p "" /dev/sdb1 /media/truecrypt2
- else
- echo "Mounting internal partition and external HDD..."
- truecrypt --text --slot=1 --keyfiles=/home/dupa/what3vr.sprld -p "" /dev/sda5 /media/truecrypt1
- truecrypt --text --slot=2 --/home/dupa/what3vr.sprld -p "" /dev/sdb1 /media/truecrypt2
- fi
- fi
- elif [ $1 = "--dismount" ] || [ $1 = "-d" ]
- then
- if [ $2 ]
- then
- if [ $2 = "internal" ]
- then
- echo "Dismounting internal partition..."
- truecrypt --text --force -d /dev/sda5
- elif [ $2 = "external" ]
- then
- echo "Dismounting external HDD..."
- truecrypt --text -d --force /dev/sdb1
- else
- echo "Dismounting internal partition and external HDD..."
- truecrypt --text -d --force /dev/sda5
- truecrypt --text -d --force /dev/sdb1
- fi
- fi
- else
- echo "
- Usage:
- option description
- --mount <drive> Mounts a <drive>
- -m <drive>
- --dismount <drive> Dismounts a <drive>
- -d <drive>
- Drives:
- drive description
- internal Internal HDD Partition
- external External HDD
- "
- fi
- else
- echo "Use --help for information about usage."
- fi
Advertisement
Add Comment
Please, Sign In to add comment