LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to automatically execute a command (TrueCrypt) on mount (https://www.linuxquestions.org/questions/linux-general-1/how-to-automatically-execute-a-command-truecrypt-on-mount-477346/)

cbonar 08-25-2006 02:13 PM

How to automatically execute a command (TrueCrypt) on mount
 
Simply that : I would like to make my Ubuntu automatically execute some script when my USB token is mounted.

I'm already using udev to create a /dev/myusbkey device, so it's always mounted at the same place (let's say /media/myusbkey) in the filesystem.

What would be the most convenient / portable / easy way to do it ?

Note : I would use this to automatically mount the TrueCrypt volume on my usb key when mounted, so if you have a better idea for this specific need...

Tinkster 08-27-2006 02:11 AM

TrueCrypt sounds like an encoded/encrypted FS ... do you need to use
a password/passphrase to get to it?


Cheers,
Tink

cbonar 08-27-2006 10:42 AM

Yes it's an encoded fs and I need to type a password to get it mounted.

Since the fs is actually a file on my usb token (FAT), the token has first to be mounted and only then I can mount the encoded file as a volume using the 'truecrypt' command

Two steps on my Ubuntu.

If only I knew a way to trigger an arbitrary command on an USB insertion event, I could do it in one step.


All times are GMT -5. The time now is 02:30 PM.