diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-12-17 10:34:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-17 10:34:43 +0100 |
commit | c16782577b696ec4e25d8922cea1bdc80401e9b9 (patch) | |
tree | e3419c1ebc5381d0b496448e1552816e8e59d2d2 /src/cryptsetup | |
parent | e16f18bddf5f13514d30b8886838e81abfc10528 (diff) | |
parent | ff757c9d294153a26a9dd2d9817d1985656f3002 (diff) | |
download | systemd-c16782577b696ec4e25d8922cea1bdc80401e9b9.tar.gz |
Merge pull request #14241 from keszybz/resume-timeout
Bump resume timeout to infinity
Diffstat (limited to 'src/cryptsetup')
-rw-r--r-- | src/cryptsetup/cryptsetup-generator.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index 82e4314913..b87abe9ece 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -366,7 +366,7 @@ static int create_disk( r = generator_write_timeouts(arg_dest, device, name, options, &filtered); if (r < 0) - return r; + log_warning_errno(r, "Failed to write device timeout drop-in: %m"); if (filtered) { filtered_escaped = specifier_escape(filtered); @@ -419,11 +419,11 @@ static int create_disk( return r; if (!noauto && !nofail) { - r = write_drop_in(arg_dest, dmname, 90, "device-timeout", - "# Automatically generated by systemd-cryptsetup-generator \n\n" + r = write_drop_in(arg_dest, dmname, 40, "device-timeout", + "# Automatically generated by systemd-cryptsetup-generator\n\n" "[Unit]\nJobTimeoutSec=0"); if (r < 0) - return log_error_errno(r, "Failed to write device drop-in: %m"); + log_warning_errno(r, "Failed to write device timeout drop-in: %m"); } return 0; @@ -650,7 +650,6 @@ static int add_proc_cmdline_devices(void) { crypto_device *d; HASHMAP_FOREACH(d, arg_disks, i) { - const char *options; _cleanup_free_ char *device = NULL; if (!d->create) @@ -666,14 +665,11 @@ static int add_proc_cmdline_devices(void) { if (!device) return log_oom(); - if (d->options) - options = d->options; - else if (arg_default_options) - options = arg_default_options; - else - options = "timeout=0"; - - r = create_disk(d->name, device, d->keyfile ?: arg_default_keyfile, d->keydev, options); + r = create_disk(d->name, + device, + d->keyfile ?: arg_default_keyfile, + d->keydev, + d->options ?: arg_default_options); if (r < 0) return r; } |