Re: How to automatically decrypt a disk on connection

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

 



On 3/27/24 12:22, Andrei Borzenkov wrote:
> On 27.03.2024 20:56, Orion Poplawski wrote:
>> The only thing that's a bit funky with it is that it generates:
>>
>> Invalid unit name "clevis-luks-unlock@/dev/sda1.service" escaped as
>> "clevis-luks-unlock@-dev-sda1.service" (maybe you should use systemd-escape?).
>>
>> But I'm not sure how else to handle it.
>>
>> If I left it as ENV{SYSTEMD_WANTS}="clevis-luks-unlock@" I would get the
>> following instance:
>>
>> sys-devices-pci0000:00-0000:00:02.0-0000:05:00.0-0000:06:02.0-0000:08:00.0-usb9-9\x2d1-9\x2d1:1.0-host2-target2:0:0-2:0:0:0-block-sda-sda1
>>
>> which I can unescape with %f but not sure how to get that to the actual device
>> file.
>>
>> Any suggestions?
>>
>>
> 
> Use $kernel in rule and /dev/%I in service.

Thank you, that works.  udev monitor -p doesn't show the value of KERNEL so I
didn't see that as an option.

-- 
Orion Poplawski
he/him/his  - surely the least important thing about me
Manager of IT Systems                      720-772-5637
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion@xxxxxxxx
Boulder, CO 80301                 https://www.nwra.com/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux