chiark / gitweb /
crypto: let the cryptsetup binary handles its own configurable timeouts
authorLennart Poettering <lennart@poettering.net>
Thu, 14 Apr 2011 00:36:02 +0000 (02:36 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 16 Apr 2011 00:03:34 +0000 (02:03 +0200)
src/cryptsetup-generator.c
src/cryptsetup.c

index 9b62e6a..b57c0b7 100644 (file)
@@ -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),
index f52a41b..4ef9606 100644 (file)
@@ -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: