Skip to content

Commit

Permalink
cryptsetup: Fix timeout on dm device.
Browse files Browse the repository at this point in the history
Fix a bug in systemd-cryptsetup-generator which caused the drop-in
setting the job timeout for the dm device unit to be written with a
name different than the unit name.

https://bugs.freedesktop.org/show_bug.cgi?id=84409
  • Loading branch information
Bonstra authored and poettering committed Oct 24, 2014
1 parent a2726e5 commit a6fb0dc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cryptsetup/cryptsetup-generator.c
Expand Up @@ -246,7 +246,12 @@ static int create_disk(
}

if (!noauto && !nofail) {
r = write_drop_in(arg_dest, name, 90, "device-timeout",
_cleanup_free_ char *dmname;
dmname = strjoin("dev-mapper-", e, ".device", NULL);
if (!dmname)
return log_oom();

r = write_drop_in(arg_dest, dmname, 90, "device-timeout",
"# Automatically generated by systemd-cryptsetup-generator \n\n"
"[Unit]\nJobTimeoutSec=0");
if (r < 0) {
Expand Down

0 comments on commit a6fb0dc

Please sign in to comment.