From: Lennart Poettering Date: Wed, 7 Apr 2021 09:21:50 +0000 (+0200) Subject: generator: explain why systemd-root-fsck.service exists in a comment X-Git-Tag: v249-rc1~370^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F19381%2Fhead;p=thirdparty%2Fsystemd.git generator: explain why systemd-root-fsck.service exists in a comment --- diff --git a/src/shared/generator.c b/src/shared/generator.c index 7d00c9ef0df..1daa9e7de80 100644 --- a/src/shared/generator.c +++ b/src/shared/generator.c @@ -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);