Created
May 22, 2010 03:46
-
-
Save lionelyoung/409741 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
#put name of device here | |
MYMOUNTDIR=/mnt/location/here | |
PASSFILE=/home/yourname/passfile.kdb | |
DEVICEDIR=/dev/sdc1 | |
if [ -b /dev/sdc ]; then | |
echo Mounting /dev/sdc | |
exo-mount -d $DEVICEDIR || exit 1 | |
fi | |
if [ -d $MYMOUNTDIR ]; then | |
echo Rsyncing passwords to $MYMOUNTDIR | |
rsync --verbose $PASSFILE $MYMOUNTDIR || exit 1 | |
else | |
echo $MYMOUNTDIR does not exist, this is not your USB drive | |
fi | |
if [ -b /dev/sdc ]; then | |
echo Unmounting $DEVICEDIR | |
exo-unmount -d $DEVICEDIR || exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment