From: Lennart Poettering Date: Thu, 14 Apr 2011 00:36:02 +0000 (+0200) Subject: crypto: let the cryptsetup binary handles its own configurable timeouts X-Git-Tag: v25~41 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=9072492933eaacbcd8daed3f9baf90583dd22574 crypto: let the cryptsetup binary handles its own configurable timeouts --- diff --git a/src/cryptsetup-generator.c b/src/cryptsetup-generator.c index 9b62e6a6d..b57c0b742 100644 --- a/src/cryptsetup-generator.c +++ b/src/cryptsetup-generator.c @@ -115,6 +115,7 @@ static int create_disk( "\n[Service]\n" "Type=oneshot\n" "RemainAfterExit=yes\n" + "TimeoutSec=0\n" /* the binary handles timeouts anyway */ "ExecStart=" SYSTEMD_CRYPTSETUP_PATH " attach '%s' '%s' '%s' '%s'\n" "ExecStop=" SYSTEMD_CRYPTSETUP_PATH " detach '%s'\n", name, u, strempty(password), strempty(options), diff --git a/src/cryptsetup.c b/src/cryptsetup.c index f52a41b99..4ef9606d3 100644 --- a/src/cryptsetup.c +++ b/src/cryptsetup.c @@ -40,7 +40,7 @@ static char *opt_hash = NULL; static unsigned opt_tries = 0; static bool opt_readonly = false; static bool opt_verify = false; -static usec_t opt_timeout = 0; +static usec_t opt_timeout = DEFAULT_TIMEOUT_USEC; /* Options Debian's crypttab knows we don't: