diff options
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 | } | ||
