]> err.no Git - systemd/commitdiff
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 9b62e6a6d3c62ccf3f9fece7cd203c64eeebca11..b57c0b742ab141f84990edd1ee6f3d1f6d5a6f50 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 f52a41b995dbe8ca4bbf253daa72ef589eea5b57..4ef9606d39fabc415e003ab0736ab426a9f7618a 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: