summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cryptsetup-generator.c1
-rw-r--r--src/cryptsetup.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptsetup-generator.c b/src/cryptsetup-generator.c
index 9b62e6a6d3..b57c0b742a 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 f52a41b995..4ef9606d39 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: