[systemd-devel] [PATCH] core/cryptsetup: Add WantsMountFor option to enable fallback to password request for crypt mounts.

Przemek Rudy prudy1 at o2.pl
Tue May 27 10:31:46 PDT 2014


On 05/27/2014 01:37 PM, Harald Hoyer wrote:
> On 21.05.2014 10:03, Lennart Poettering wrote:
>> On Sun, 18.05.14 19:36, Przemek Rudy (prudy1 at o2.pl) wrote:
>>
>>> diff --git a/src/core/automount.c b/src/core/automount.c
>>> index 65e6d6f..d4359b9 100644
>>> --- a/src/core/automount.c
>>> +++ b/src/core/automount.c
>>> @@ -124,7 +124,7 @@ static int automount_add_mount_links(Automount *a) {
>>>          if (r < 0)
>>>                  return r;
>>>  
>>> -        return unit_require_mounts_for(UNIT(a), parent);
>>> +        return unit_needs_mounts_for(UNIT(a), parent, true);
>>>  }
>>>  
>>
>> Please make the the last parameter one of type UnitDependency, so that
>> one can either pass UNIT_WANTS or UNIT_REQUIRES there. THat makes the
>> calls much more descriptive, as well as more generic.
>>
>> Otherwise looks pretty good!
>>
>> Lennart
>>
> 
> Hmm, I might see a problem in the initramfs, where devices show up bit by bit.
> The user might then be confronted with the password dialog, although the device
> with the key file will show up a little bit later.
> 
> But I might be wrong. Time will tell.
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> 
Hello Harald,
After years, same thing different place, was in dracut now in systemd. :)

Please note that the key device has its own mounting timeout that goes into fstab:
x-systemd.device-timeout=10,auto,nofail

this ensures we have x-systemd.device-timeout seconds to wait for the key device before give up.

Best,
Przemek


More information about the systemd-devel mailing list