chiark / gitweb /
logind: move more files into subdirectory
[elogind.git] / src / cryptsetup-generator.c
index 696f44ae3670dee8868a1b97f6d8d93858560c30..a48b7a45626abad773f2cf7c92871e0eafb13e59 100644 (file)
@@ -47,7 +47,7 @@ static bool has_option(const char *haystack, const char *needle) {
                         continue;
                 }
 
-                if (f[l] != 0 && f[l] == ',') {
+                if (f[l] != 0 && f[l] != ',') {
                         f++;
                         continue;
                 }
@@ -124,6 +124,9 @@ static int create_disk(
                          streq(password, "/dev/hw_random")))
                 fprintf(f,
                         "After=systemd-random-seed-load.service\n");
+        else
+                fprintf(f,
+                        "Before=local-fs.target\n");
 
         fprintf(f,
                 "\n[Service]\n"
@@ -246,6 +249,8 @@ int main(int argc, char *argv[]) {
         log_parse_environment();
         log_open();
 
+        umask(0022);
+
         if (!(f = fopen("/etc/crypttab", "re"))) {
 
                 if (errno == ENOENT)