[systemd-devel] [PATCH] units: add [Install] blocks for the binfmt_misc units
Ross Burton
ross.burton at intel.com
Fri Sep 6 07:19:47 PDT 2013
If the administrator disables systemd-binfmt it can't be re-enabled correctly
because there is no [Install] block, the symlinks to sysinit being created at
install time manually. Add an Install block so that the those symlinks can be
re-created using systemctl, and a dependency on the automounter in
systemd-binfmt.
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
units/proc-sys-fs-binfmt_misc.automount | 3 +++
units/systemd-binfmt.service.in | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
index 6be3893..709adef 100644
--- a/units/proc-sys-fs-binfmt_misc.automount
+++ b/units/proc-sys-fs-binfmt_misc.automount
@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
[Automount]
Where=/proc/sys/fs/binfmt_misc
+
+[Install]
+WantedBy=sysinit.target
diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
index 02dfe77..86d3481 100644
--- a/units/systemd-binfmt.service.in
+++ b/units/systemd-binfmt.service.in
@@ -11,6 +11,7 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
DefaultDependencies=no
Conflicts=shutdown.target
+Wants=proc-sys-fs-binfmt_misc.automount
After=systemd-readahead-collect.service systemd-readahead-replay.service proc-sys-fs-binfmt_misc.automount
Before=sysinit.target shutdown.target
ConditionPathIsReadWrite=/proc/sys/
@@ -24,3 +25,6 @@ ConditionDirectoryNotEmpty=|/run/binfmt.d
Type=oneshot
RemainAfterExit=yes
ExecStart=@rootlibexecdir@/systemd-binfmt
+
+[Install]
+WantedBy=sysinit.target
--
1.7.10.4
More information about the systemd-devel
mailing list