[oe-commits] Chen Qi : alsa-state: install init script only when 'sysvinit' is in DISTRO_FEATURES
git at git.openembedded.org
git at git.openembedded.org
Mon Aug 11 09:55:09 UTC 2014
Module: openembedded-core.git
Branch: master
Commit: 39759640c8abe51c8ded4c1ca6853b523a81c2f5
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=39759640c8abe51c8ded4c1ca6853b523a81c2f5
Author: Chen Qi <Qi.Chen at windriver.com>
Date: Wed Aug 6 22:46:42 2014 -0400
alsa-state: install init script only when 'sysvinit' is in DISTRO_FEATURES
The /etc/init.d/alsa-state is totally useless for a systemd image.
Its functionality has been replaced by alsa-state.service files.
So if 'sysvinit' is not in DISTRO_FEATURES, installing this script doesn't
make any sense.
[YOCTO #4420]
Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
---
meta/recipes-bsp/alsa-state/alsa-state.bb | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-bsp/alsa-state/alsa-state.bb b/meta/recipes-bsp/alsa-state/alsa-state.bb
index 874d6bb..d2f8ea2 100644
--- a/meta/recipes-bsp/alsa-state/alsa-state.bb
+++ b/meta/recipes-bsp/alsa-state/alsa-state.bb
@@ -24,11 +24,15 @@ INITSCRIPT_NAME = "alsa-state"
INITSCRIPT_PARAMS = "start 39 S . stop 31 0 6 ."
do_install() {
- sed -i -e "s:#STATEDIR#:${localstatedir}/lib/alsa:g" ${WORKDIR}/alsa-state-init
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/alsa-state-init ${D}${sysconfdir}/init.d/alsa-state
+ # Only install the init script when 'sysvinit' is in DISTRO_FEATURES.
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+ sed -i -e "s:#STATEDIR#:${localstatedir}/lib/alsa:g" ${WORKDIR}/alsa-state-init
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/alsa-state-init ${D}${sysconfdir}/init.d/alsa-state
+ fi
install -d ${D}/${localstatedir}/lib/alsa
+ install -d ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/*.state ${D}${localstatedir}/lib/alsa
}
More information about the Openembedded-commits
mailing list