summaryrefslogtreecommitdiff
path: root/src/cryptsetup/cryptsetup-generator.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-05-22 23:08:24 +0200
committerLennart Poettering <lennart@poettering.net>2012-05-22 23:08:24 +0200
commit1b64d026af01277e332d10d9e67e2eed5a4ded28 (patch)
treeaf94d466a69a851a4a3ca9f169d6aacee5531669 /src/cryptsetup/cryptsetup-generator.c
parenta6903061530cac5fbaa99a080a93221c02c349f9 (diff)
units: remove service sysv_path variable and replace it by generic unit_path
UnitPath= is also writable via native units and may be used by generators to clarify from which file a unit is generated. This patch also hooks up the cryptsetup and fstab generators to set UnitPath= accordingly.
Diffstat (limited to 'src/cryptsetup/cryptsetup-generator.c')
-rw-r--r--src/cryptsetup/cryptsetup-generator.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
index 7eb122d276..51706b7a86 100644
--- a/src/cryptsetup/cryptsetup-generator.c
+++ b/src/cryptsetup/cryptsetup-generator.c
@@ -115,6 +115,7 @@ static int create_disk(
"# Automatically generated by systemd-cryptsetup-generator\n\n"
"[Unit]\n"
"Description=Cryptography Setup for %%I\n"
+ "SourcePath=/etc/crypttab\n"
"Conflicts=umount.target\n"
"DefaultDependencies=no\n"
"BindTo=%s dev-mapper-%%i.device\n"
@@ -129,11 +130,9 @@ static int create_disk(
if (password && (streq(password, "/dev/urandom") ||
streq(password, "/dev/random") ||
streq(password, "/dev/hw_random")))
- fprintf(f,
- "After=systemd-random-seed-load.service\n");
+ fputs("After=systemd-random-seed-load.service\n", f);
else
- fprintf(f,
- "Before=local-fs.target\n");
+ fputs("Before=local-fs.target\n", f);
fprintf(f,
"\n[Service]\n"