From 9072492933eaacbcd8daed3f9baf90583dd22574 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 14 Apr 2011 02:36:02 +0200 Subject: [PATCH] crypto: let the cryptsetup binary handles its own configurable timeouts --- src/cryptsetup-generator.c | 1 + src/cryptsetup.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cryptsetup-generator.c b/src/cryptsetup-generator.c index 9b62e6a6..b57c0b74 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 f52a41b9..4ef9606d 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: -- 2.39.5