diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptsetup/cryptsetup-generator.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index c7f30f6a15..05ceff443f 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -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) { |