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.
This commit is contained in:
Lennart Poettering
2012-05-22 23:08:24 +02:00
parent a690306153
commit 1b64d026af
14 changed files with 85 additions and 92 deletions
+3 -4
View File
@@ -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"