summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/initscripts')
-rw-r--r--meta/recipes-core/initscripts/initscripts_1.0.bb25
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
42inherit update-alternatives 42inherit update-alternatives
43DEPENDS_append = " update-rc.d-native" 43DEPENDS_append = " update-rc.d-native"
44DEPENDS_append = " ${@base_contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
44 45
45PACKAGES =+ "${PN}-functions" 46PACKAGES =+ "${PN}-functions"
46RDEPENDS_${PN} = "${PN}-functions" 47RDEPENDS_${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
139MASKED_SCRIPTS = " \
140 banner \
141 bootmisc \
142 checkroot \
143 devpts \
144 hostname \
145 mountall \
146 mountnfs \
147 rmnologin \
148 sysfs \
149 urandom"
150
151pkg_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
160fi
161}