units: delay binfmt processing until after local-fs.target
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 16 Nov 2021 08:19:07 +0000 (09:19 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 13 Jan 2022 09:55:00 +0000 (10:55 +0100)
Users may use rules that refer to binaries e.g. in /opt or /usr/local,
and those directories may be separate mount points. We don't need the
binfmt rules in early boot, so let's delay the service so that we can
rely on the full local filesystem being visible.

Fixes #21178.

(cherry picked from commit 0491ab5fcd1e8a7d6c532c591dabb98a9e6ed648)
(cherry picked from commit b564be5d5e8ac063a378e818af51a267e99bff0d)

units/systemd-binfmt.service.in

index ca76750c0a8aace6667fa5f92a37c3cfd7bfd574..8c0d222c6fdd86a38efa3ca28d8118c3200e0feb 100644 (file)
@@ -16,6 +16,7 @@ DefaultDependencies=no
 Conflicts=shutdown.target
 After=proc-sys-fs-binfmt_misc.automount
 After=proc-sys-fs-binfmt_misc.mount
+After=local-fs.target
 Before=sysinit.target shutdown.target
 ConditionPathIsReadWrite=/proc/sys/
 ConditionDirectoryNotEmpty=|/lib/binfmt.d