Created
August 29, 2011 09:04
-
-
Save oxyc/1178052 to your computer and use it in GitHub Desktop.
Automount encrypted USB drive containg ssh keys.
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
# Based on several guides, primarily: | |
# http://ninetynine.be/blog/2009/03/ubuntu-backup-to-usb-drive-on-mount/ | |
# /etc/udev/rules.d/81-local.rules | |
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="…", ATTRS{idProduct}=="…", RUN+="/usr/bin/truecrypt_mount.sh" | |
ACTION=="remove", SUBSYSTEMS=="usb", ATTRS{idVendor}=="…", ATTRS{idProduct}=="…", RUN+="/usr/bin/truecrypt_unmount.sh" | |
# /usr/bin/truecrypt_mount.sh | |
truecrypt /dev/disk/by-id/… -k … --protect-hidden=no --password= /mnt/houdini/ | |
# /usr/bin/truecrypt_unmount.sh | |
truecrypt -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment