diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-02-13 02:16:25 -0500 |
---|---|---|
committer | Chen Qi <Qi.Chen@windriver.com> | 2014-02-13 15:27:44 +0800 |
commit | 7394b4a34e973a1655132709c054a272cf367252 (patch) | |
tree | f5e480b0318b635b80dbc3651fb51d18362a5019 | |
parent | b188bda18690dc1af1cb5d18bb0f3ad40c9a6cc6 (diff) | |
download | openembedded-core-contrib-ChenQi/alsa-state-systemd.tar.gz |
alsa-state: do not install the init script in case of systemdChenQi/alsa-state-systemd
As the corresponding service files have already been provided by
the alsa-utils-alsactl package, the init script is really not needed.
So we do not install it in a systemd based image.
[YOCTO #4420]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-rw-r--r-- | meta/recipes-bsp/alsa-state/alsa-state.bb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/meta/recipes-bsp/alsa-state/alsa-state.bb b/meta/recipes-bsp/alsa-state/alsa-state.bb index 552fcfc022..6dbc1aa66f 100644 --- a/meta/recipes-bsp/alsa-state/alsa-state.bb +++ b/meta/recipes-bsp/alsa-state/alsa-state.bb @@ -18,16 +18,20 @@ SRC_URI = "\ file://alsa-state-init \ " -inherit update-rc.d +inherit update-rc.d systemd 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 - + # The alsa-utils-alsactl already provides corresponding systemd unit files. + # So the init script should not be installed in a systemd based image. + install -d ${D}${sysconfdir} + if ${@base_contains('DISTRO_FEATURES','systemd','false','true',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 -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir} install -m 0644 ${WORKDIR}/*.state ${D}${localstatedir}/lib/alsa |