summaryrefslogtreecommitdiff
path: root/units/systemd-binfmt.service.in
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-04-23 16:36:45 +0200
committerLennart Poettering <lennart@poettering.net>2020-04-23 17:14:45 +0200
commit846acb6798a63f35162f58e1146d1a1f40849e86 (patch)
tree4a12d9a7dad0e240dff1300f1a0dc8e03d7beaff /units/systemd-binfmt.service.in
parentf3670df13e144c2f81bf6f9a0bea581e6d555bdd (diff)
downloadsystemd-846acb6798a63f35162f58e1146d1a1f40849e86.tar.gz
binfmt: also unregister binfmt entries from unit
We unregister binfmt_misc twice during shutdown with this change: 1. A previous commit added support for doing that in the final shutdown phase, i.e. when we do the aggressive umount loop. This is the robust thing to do, in case the earlier ("clean") shutdown phase didn't work for some reason. 2. This commit adds support for doing that when systemd-binfmt.service is stopped. This is a good idea so that people can order mounts before the service if they want to register binaries from such mounts, as in that case we'll undo the registration on shutdown again, before unmounting those mounts. And all that, just because of that weird "F" flag the kernel introduced that can pin files... Fixes: #14981
Diffstat (limited to 'units/systemd-binfmt.service.in')
-rw-r--r--units/systemd-binfmt.service.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
index 0c0f26451b..e54e95e11d 100644
--- a/units/systemd-binfmt.service.in
+++ b/units/systemd-binfmt.service.in
@@ -28,4 +28,5 @@ ConditionDirectoryNotEmpty=|/run/binfmt.d
Type=oneshot
RemainAfterExit=yes
ExecStart=@rootlibexecdir@/systemd-binfmt
+ExecStop=@rootlibexecdir@/systemd-binfmt --unregister
TimeoutSec=90s