blob: f69e26ec5cd0fbe0b706c8f7ed98f7460a5820c2 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001From 3436b12d40bf4f4ab7e3e16600e5f6c35a470da4 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:03:44 +0000
4Subject: [PATCH 05/36] binfmt: Don't install dependency links at install time
5 for the binfmt services
6
7use [Install] blocks so that they get created when the service is enabled
8like a traditional service.
9
10The [Install] blocks were rejected upstream as they don't have a way to
11"enable"
12it on install without static symlinks which can't be disabled, only
13masked. We
14however can do that in a postinst.
15
16Upstream-Status: Denied
17
18Signed-off-by: Ross Burton <ross.burton@intel.com>
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20---
21 Makefile.am | 4 ----
22 units/proc-sys-fs-binfmt_misc.automount | 3 +++
23 units/systemd-binfmt.service.in | 5 +++++
24 3 files changed, 8 insertions(+), 4 deletions(-)
25
26diff --git a/Makefile.am b/Makefile.am
27index 03341fc..629740f 100644
28--- a/Makefile.am
29+++ b/Makefile.am
30@@ -4387,10 +4387,6 @@ INSTALL_DIRS += \
31 $(prefix)/lib/binfmt.d \
32 $(sysconfdir)/binfmt.d
33
34-SYSINIT_TARGET_WANTS += \
35- systemd-binfmt.service \
36- proc-sys-fs-binfmt_misc.automount
37-
38 endif
39
40 EXTRA_DIST += \
41diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
42index 6be3893..709adef 100644
43--- a/units/proc-sys-fs-binfmt_misc.automount
44+++ b/units/proc-sys-fs-binfmt_misc.automount
45@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
46
47 [Automount]
48 Where=/proc/sys/fs/binfmt_misc
49+
50+[Install]
51+WantedBy=sysinit.target
52diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
53index d53073e..8c57ee0 100644
54--- a/units/systemd-binfmt.service.in
55+++ b/units/systemd-binfmt.service.in
56@@ -11,6 +11,8 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
57 Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
58 DefaultDependencies=no
59 Conflicts=shutdown.target
60+Wants=proc-sys-fs-binfmt_misc.automount
61+
62 After=proc-sys-fs-binfmt_misc.automount
63 Before=sysinit.target shutdown.target
64 ConditionPathIsReadWrite=/proc/sys/
65@@ -25,3 +27,6 @@ Type=oneshot
66 RemainAfterExit=yes
67 ExecStart=@rootlibexecdir@/systemd-binfmt
68 TimeoutSec=90s
69+
70+[Install]
71+WantedBy=sysinit.target
72--
731.8.3.1
74