chiark / gitweb /
units: remove service sysv_path variable and replace it by generic unit_path
[elogind.git] / src / cryptsetup / cryptsetup-generator.c
index 7eb122d27618794ba52c4783450a26eac251c212..51706b7a860766c804fbefe8fbff283cc1f60a96 100644 (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"