summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-08-06 22:46:42 -0400
committerChen Qi <Qi.Chen@windriver.com>2014-08-07 16:25:11 +0800
commit7ac62381a30c4d0031b6eb48d25d5ccb1bc8a1ed (patch)
tree01aa4ec4717a16e1b25a648f545a7ca390527029
parent1fafe7ccc563d5ac9e41f5c1de93d2736745b512 (diff)
downloadopenembedded-core-contrib-7ac62381a30c4d0031b6eb48d25d5ccb1bc8a1ed.tar.gz
openembedded-core-contrib-7ac62381a30c4d0031b6eb48d25d5ccb1bc8a1ed.tar.bz2
openembedded-core-contrib-7ac62381a30c4d0031b6eb48d25d5ccb1bc8a1ed.zip
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@windriver.com>
-rw-r--r--meta/recipes-bsp/alsa-state/alsa-state.bb10
1 files 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 874d6bbe83..d2f8ea2be1 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
}