diff options
author | Ross Burton <ross.burton@intel.com> | 2014-02-11 22:43:04 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-11 22:59:38 +0000 |
commit | 7b317cdd1d407942d992ad68c450fc7743ab09f4 (patch) | |
tree | a2de295f02ac6e97dd63e895d2f694e4d96ca589 /meta/recipes-core/initscripts | |
parent | 92cad721d764ec28c3570dfe4a80847c3df19453 (diff) | |
download | poky-7b317cdd1d407942d992ad68c450fc7743ab09f4.tar.gz |
initscripts: mask initscripts from systemd
Many of the init scripts in here will do nasty things if systemd decides to run
them. Mask the obviously bad ones so that systemd won't attempt to invoke them
if initscripts is installed with systemd.
(From OE-Core rev: 844f897710dfee9c59599d09b5c8c906e0d70ac0)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/initscripts')
-rw-r--r-- | meta/recipes-core/initscripts/initscripts_1.0.bb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb index d1644a3204..20c025752b 100644 --- a/meta/recipes-core/initscripts/initscripts_1.0.bb +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb | |||
@@ -41,6 +41,7 @@ KERNEL_VERSION = "" | |||
41 | 41 | ||
42 | inherit update-alternatives | 42 | inherit update-alternatives |
43 | DEPENDS_append = " update-rc.d-native" | 43 | DEPENDS_append = " update-rc.d-native" |
44 | DEPENDS_append = " ${@base_contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" | ||
44 | 45 | ||
45 | PACKAGES =+ "${PN}-functions" | 46 | PACKAGES =+ "${PN}-functions" |
46 | RDEPENDS_${PN} = "${PN}-functions" | 47 | RDEPENDS_${PN} = "${PN}-functions" |
@@ -134,3 +135,27 @@ do_install () { | |||
134 | # populate-volatile.sh | 135 | # populate-volatile.sh |
135 | update-rc.d -r ${D} dmesg.sh start 38 S . | 136 | update-rc.d -r ${D} dmesg.sh start 38 S . |
136 | } | 137 | } |
138 | |||
139 | MASKED_SCRIPTS = " \ | ||
140 | banner \ | ||
141 | bootmisc \ | ||
142 | checkroot \ | ||
143 | devpts \ | ||
144 | hostname \ | ||
145 | mountall \ | ||
146 | mountnfs \ | ||
147 | rmnologin \ | ||
148 | sysfs \ | ||
149 | urandom" | ||
150 | |||
151 | pkg_postinst_${PN} () { | ||
152 | if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
153 | if [ -n "$D" ]; then | ||
154 | OPTS="--root=$D" | ||
155 | fi | ||
156 | for SERVICE in ${MASKED_SCRIPTS}; do | ||
157 | systemctl $OPTS mask $SERVICE.service | ||
158 | done | ||
159 | fi | ||
160 | fi | ||
161 | } | ||