Commit 9ece938a authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Zbigniew Jędrzejewski-Szmek
parent d7607eac
......@@ -365,7 +365,6 @@ Features:
* cryptsetup:
- cryptsetup-generator: warn if the password files are world-readable
- cryptsetup-generator: add RequiresMountsFor= to cryptseup service files referencing a file, similar for devices
- cryptsetup-generator: allow specification of passwords in crypttab itself
- move cryptsetup key caching into kernel keyctl?
https://bugs.freedesktop.org/show_bug.cgi?id=54982
......
......@@ -102,18 +102,17 @@ static int create_disk(
return -errno;
}
fprintf(f,
fputs(
"# Automatically generated by systemd-cryptsetup-generator\n\n"
"[Unit]\n"
"Description=Cryptography Setup for %%I\n"
"Description=Cryptography Setup for %I\n"
"Documentation=man:systemd-cryptsetup@.service(8) man:crypttab(5)\n"
"SourcePath=/etc/crypttab\n"
"Conflicts=umount.target\n"
"DefaultDependencies=no\n"
"BindsTo=%s dev-mapper-%%i.device\n"
"After=systemd-readahead-collect.service systemd-readahead-replay.service %s\n"
"Before=umount.target\n",
d, d);
"BindsTo=dev-mapper-%i.device\n"
"After=systemd-readahead-collect.service systemd-readahead-replay.service\n",
f);
if (!nofail)
fprintf(f,
......@@ -126,6 +125,17 @@ static int create_disk(
else
fputs("Before=local-fs.target\n", f);
if (is_device_path(u))
fprintf(f,
"BindsTo=%s\n"
"After=%s\n"
"Before=umount.target\n",
d, d);
else
fprintf(f,
"RequiresMountsFor=%s\n",
u);
fprintf(f,
"\n[Service]\n"
"Type=oneshot\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment