[systemd-devel] [PATCH] cryptsetup-generator: Add JobTimeoutSec=0 for all known crypt devices

Harald Hoyer harald at redhat.com
Wed Apr 3 08:02:34 PDT 2013


Am 03.04.2013 16:52, schrieb Lennart Poettering:
> On Wed, 03.04.13 15:34, harald at redhat.com (harald at redhat.com) wrote:
> 
>> From: Harald Hoyer <harald at redhat.com>
>>
>> put JobTimeoutSec=0 in <device-unit>.d/JobTimeoutSec0.conf files
>>
>> This helps with grabbing a cup of coffee while booting and not have the
>> crypto password dialog timeout and systemd in a failed state.
>>
>> This is even needed for "timeout=0" in /etc/crypttab!
> 
> Well, this explanation is too short. You need to clarify that this only
> has an effect on devices listed in fstab with their device mapper path
> (i.e. rather than LABEL= or UUID=, which is by far more common). For the
> generic case there is no way around setting x-systemd.device-timeout=0
> in fstab, because we wouldn't know that the fs with that label or uuid
> is hidden behind a certain encrypted device before we have decrypted
> it.
> 

This is not true. This also affects LVM on top of the cryptsetup devices, where
none of the /dev/mapper devices is and can be in /etc/fstab.

> This really needs to be clarified in both the commit msg and in the
> comments of the code.
> 
>> +                p = strjoin(arg_dest, "/dev-mapper-", e, ".device.d/50-JobTimeoutSec0.conf", NULL);
> 
> We currently don't really use CamelCase file names, would prefer to call
> this 50-job-timeout-sec-0.conf or so.

ok

> 
> Also, please use write_string_file(), this should shorten the code quite
> a bit.

err.. I just used the same style like in the rest of the file.

> 
> Lennart
> 



More information about the systemd-devel mailing list