diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-07 11:42:46 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-10-14 16:55:22 +0100 |
commit | 5e3ed0b3a6d0f2ea484464e14028d0c9d3c3705d (patch) | |
tree | 932e7f15d9129019031ecf4abd3cd8966ce53bba /meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init | |
parent | 1960f0068410ca62b27887f5f2607a80dba596b9 (diff) | |
download | poky-5e3ed0b3a6d0f2ea484464e14028d0c9d3c3705d.tar.gz |
alsa-state: Rename init script
Having a SRC_URI called ${PN} is asking for trouble. When extending FILESPATH,
alsa-state can be treated as a directory and copied over the contents of ${WORKDIR}
which is invariably not what the user wants.
Avoid this by renaming the SRC_URI to something else and only call
it alsa-state at install time.
(From OE-Core rev: 04c73333e4b539de96f096ca2954b2313175edc4)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init')
-rwxr-xr-x | meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init b/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init new file mode 100755 index 0000000000..9850791497 --- /dev/null +++ b/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init | |||
@@ -0,0 +1,29 @@ | |||
1 | #! /bin/sh | ||
2 | # | ||
3 | # Copyright Matthias Hentges <devel@hentges.net> (c) 2007 | ||
4 | # License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) | ||
5 | # | ||
6 | # Filename: alsa-state | ||
7 | # Date: 20070308 (YMD) | ||
8 | |||
9 | |||
10 | asound_restore(){ | ||
11 | echo "ALSA: Restoring mixer settings..." | ||
12 | if test -x /usr/sbin/alsactl -a -e #STATEDIR#/asound.state | ||
13 | then | ||
14 | /usr/sbin/alsactl -f #STATEDIR#/asound.state restore & | ||
15 | fi | ||
16 | } | ||
17 | |||
18 | asound_store(){ | ||
19 | echo "ALSA: Storing mixer settings..." | ||
20 | if test -x /usr/sbin/alsactl | ||
21 | then | ||
22 | /usr/sbin/alsactl -f #STATEDIR#/asound.state store | ||
23 | fi | ||
24 | } | ||
25 | |||
26 | case "$1" in | ||
27 | start) asound_restore ;; | ||
28 | stop) asound_store ;; | ||
29 | esac | ||