mirror of
https://git.yoctoproject.org/poky
synced 2026-04-18 12:32:12 +02:00
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>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user