]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
generator: explain why systemd-root-fsck.service exists in a comment 19381/head
authorLennart Poettering <lennart@poettering.net>
Wed, 7 Apr 2021 09:21:50 +0000 (11:21 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 21 Apr 2021 13:18:07 +0000 (15:18 +0200)
src/shared/generator.c

index 7d00c9ef0dfc107daff60585134d489ea95c98f2..1daa9e7de80fabd5b2c729a5e0a4f6489977e286 100644 (file)
@@ -164,6 +164,11 @@ int generator_write_fsck_deps(
         if (path_equal(where, "/")) {
                 const char *lnk;
 
+                /* We support running the fsck instance for the root fs while it is already mounted, for
+                 * compatibility with non-initrd boots. It's ugly, but it is how it is. Since – unlike for
+                 * regular file systems – this means the ordering is reversed (i.e. mount *before* fsck) we
+                 * have a separate fsck unit for this, independent of systemd-fsck@.service. */
+
                 lnk = strjoina(dir, "/" SPECIAL_LOCAL_FS_TARGET ".wants/" SPECIAL_FSCK_ROOT_SERVICE);
 
                 (void) mkdir_parents(lnk, 0755);