diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-08-06 22:46:42 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-11 10:53:06 +0100 |
commit | 34ffa4e01911a8678b2e0ac6ebad44205f97120f (patch) | |
tree | c93bb1f9795c810570cb0b14144ec54be0815b79 | |
parent | f0c004089dbf98e0421f50cc975d290c4127d3f9 (diff) | |
download | poky-34ffa4e01911a8678b2e0ac6ebad44205f97120f.tar.gz |
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]
(From OE-Core rev: 39759640c8abe51c8ded4c1ca6853b523a81c2f5)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-bsp/alsa-state/alsa-state.bb | 10 |
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" | |||
24 | INITSCRIPT_PARAMS = "start 39 S . stop 31 0 6 ." | 24 | INITSCRIPT_PARAMS = "start 39 S . stop 31 0 6 ." |
25 | 25 | ||
26 | do_install() { | 26 | do_install() { |
27 | sed -i -e "s:#STATEDIR#:${localstatedir}/lib/alsa:g" ${WORKDIR}/alsa-state-init | 27 | # Only install the init script when 'sysvinit' is in DISTRO_FEATURES. |
28 | install -d ${D}${sysconfdir}/init.d | 28 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then |
29 | install -m 0755 ${WORKDIR}/alsa-state-init ${D}${sysconfdir}/init.d/alsa-state | 29 | sed -i -e "s:#STATEDIR#:${localstatedir}/lib/alsa:g" ${WORKDIR}/alsa-state-init |
30 | install -d ${D}${sysconfdir}/init.d | ||
31 | install -m 0755 ${WORKDIR}/alsa-state-init ${D}${sysconfdir}/init.d/alsa-state | ||
32 | fi | ||
30 | 33 | ||
31 | install -d ${D}/${localstatedir}/lib/alsa | 34 | install -d ${D}/${localstatedir}/lib/alsa |
35 | install -d ${D}${sysconfdir} | ||
32 | install -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir} | 36 | install -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir} |
33 | install -m 0644 ${WORKDIR}/*.state ${D}${localstatedir}/lib/alsa | 37 | install -m 0644 ${WORKDIR}/*.state ${D}${localstatedir}/lib/alsa |
34 | } | 38 | } |