cryptsetup and udev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hello,

I am trying to setup udev to automatically open a LUKS partition of my
external USB drive once it is plugged in. I have written the following udev
rules script:

ACTION="add", ENV{DEVTYPE}="partition", ENV{ID_SERIAL}="<serial number of
the drive>", RUN+="/usr/sbin/cryptsetup --key-file /etc/keyfile luksOpen
/dev/%k usbhd"
ACTION="remove", ENV{DEVTYPE}="partition", ENV{ID_SERIAL}="<serial number of
the drive>", RUN+="/usr/sbin/cryptsetup luksClose usbhd"

Udev seems to recognize my drive but instead of creating /dev/mapper/usbhd I
get some nonsense like /dev/mapper/temporary-cryptsetup-7501 or similar. I
don't know what this is but it seems not to work when I try to mount it. Any
ideas?

-- 
Henri Häkkinen


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux