]> git.ipfire.org Git - thirdparty/systemd.git/commit
generator: exit early when asked to generate fsck unit for / and /usr in initrd
authorLennart Poettering <lennart@poettering.net>
Wed, 7 Apr 2021 09:19:29 +0000 (11:19 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 21 Apr 2021 13:18:07 +0000 (15:18 +0200)
commit122860f10225a8d7c82df73af5ef8316a8e134b6
tree9bd38bc85ca068c6458f4cad01ebcbcf63404472
parentb67bbfef14293cb4a1c46573df7a68e53100832d
generator: exit early when asked to generate fsck unit for / and /usr in initrd

Let's exit early if we are invoked to generate an fsck unit for the
rootfs or /usr of the initrd itself. The "systemd-root-fsck.service" and
"systemd-usr-fsck.service" units are after all for the host file
systems, and the initrd file hierarchy is from an unpacked cpio anyway.
Hence, this semantically doesn't really make sense, so quickly exit if
we detect this case. This allows us to remove some checks further down
the codepath.
src/shared/generator.c