diff options
Diffstat (limited to 'src/cryptsetup-generator.c')
-rw-r--r-- | src/cryptsetup-generator.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cryptsetup-generator.c b/src/cryptsetup-generator.c index 792c1f52d7..73c367935f 100644 --- a/src/cryptsetup-generator.c +++ b/src/cryptsetup-generator.c @@ -102,7 +102,7 @@ static int create_disk( "DefaultDependencies=no\n" "BindTo=%s\n" "After=systemd-readahead-collect.service systemd-readahead-replay.service %s\n" - "Before=dev-mapper-%%f.device shutdown.target\n", + "Before=dev-mapper-%%i.device shutdown.target\n", d, d); if (password && (streq(password, "/dev/urandom") || @@ -116,8 +116,8 @@ static int create_disk( "Type=oneshot\n" "RemainAfterExit=yes\n" "ExecStart=" SYSTEMD_CRYPTSETUP_PATH " %s '%s' '%s' '%s' '%s'\n" - "ExecStop=" SYSTEMD_CRYPTSETUP_PATH " remove '%s'\n", - options && has_option(options, "swap") ? "format" : "create", + "ExecStop=" SYSTEMD_CRYPTSETUP_PATH " detach '%s'\n", + options && has_option(options, "swap") ? "format-and-attach" : "attach", name, u, strempty(password), strempty(options), name); |