summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/alsa-state/alsa-state.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp/alsa-state/alsa-state.bb')
-rw-r--r--meta/recipes-bsp/alsa-state/alsa-state.bb8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/recipes-bsp/alsa-state/alsa-state.bb b/meta/recipes-bsp/alsa-state/alsa-state.bb
index ecfa97530f..bc17b25b3e 100644
--- a/meta/recipes-bsp/alsa-state/alsa-state.bb
+++ b/meta/recipes-bsp/alsa-state/alsa-state.bb
@@ -26,11 +26,13 @@ INITSCRIPT_NAME = "alsa-state"
26INITSCRIPT_PARAMS = "start 39 S . stop 31 0 6 ." 26INITSCRIPT_PARAMS = "start 39 S . stop 31 0 6 ."
27 27
28do_install() { 28do_install() {
29 sed -i -e "s:#STATEDIR#:${localstatedir}/lib/alsa:g" ${WORKDIR}/alsa-state
29 install -d ${D}${sysconfdir}/init.d 30 install -d ${D}${sysconfdir}/init.d
30 install -m 0755 ${WORKDIR}/alsa-state ${D}${sysconfdir}/init.d 31 install -m 0755 ${WORKDIR}/alsa-state ${D}${sysconfdir}/init.d
31 32
33 install -d ${D}/${localstatedir}/lib/alsa
32 install -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir} 34 install -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir}
33 install -m 0644 ${WORKDIR}/*.state ${D}${sysconfdir} 35 install -m 0644 ${WORKDIR}/*.state ${D}${localstatedir}/lib/alsa
34} 36}
35 37
36PACKAGES += "alsa-states" 38PACKAGES += "alsa-states"
@@ -40,14 +42,14 @@ RRECOMMENDS_alsa-state = "alsa-states"
40FILES_${PN} = "${sysconfdir}/init.d ${sysconfdir}/asound.conf" 42FILES_${PN} = "${sysconfdir}/init.d ${sysconfdir}/asound.conf"
41CONFFILES_${PN} = "${sysconfdir}/asound.conf" 43CONFFILES_${PN} = "${sysconfdir}/asound.conf"
42 44
43FILES_alsa-states = "${sysconfdir}/*.state" 45FILES_alsa-states = "${localstatedir}/lib/alsa/*.state"
44 46
45pkg_postinst_${PN}() { 47pkg_postinst_${PN}() {
46 if test -z "$D" 48 if test -z "$D"
47 then 49 then
48 if test -x /usr/sbin/alsactl 50 if test -x /usr/sbin/alsactl
49 then 51 then
50 /usr/sbin/alsactl -f ${sysconfdir}/asound.state restore 52 /usr/sbin/alsactl -f ${localstatedir}/lib/alsa/asound.state restore
51 fi 53 fi
52 # INITSCRIPT_PARAMS changed, so remove the old and 54 # INITSCRIPT_PARAMS changed, so remove the old and
53 # install the new setting. 55 # install the new setting.