]> code.ossystems Code Review - openembedded-core.git/blob
e99dd515f09615267dfc8b83983609c5445c90c1
[openembedded-core.git] /
1 From 43a56fa36a12f09ccd78b3cf5e6ae197fcab501f Mon Sep 17 00:00:00 2001
2 From: Koen Kooi <koen@dominion.thruhere.net>
3 Date: Fri, 29 Aug 2014 18:58:56 +0300
4 Subject: [PATCH] alsactl: don't let systemd unit restore the volume when
5  asound.state is missing
6
7 This avoids an error on bootup
8
9 Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459
10
11 Upstream-Status: Pending
12
13 Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
14 Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
15 ---
16  alsactl/Makefile.am             | 7 ++++---
17  alsactl/alsa-restore.service.in | 1 +
18  2 files changed, 5 insertions(+), 3 deletions(-)
19
20 diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
21 index 47f06e9..b728c06 100644
22 --- a/alsactl/Makefile.am
23 +++ b/alsactl/Makefile.am
24 @@ -43,9 +43,10 @@ install-data-hook:
25  endif
26  
27  edit = \
28 -       $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
29 -                 -e 's,@mydatadir\@,$(mydatadir),g' \
30 -                 -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
31 +       $(SED) -e 's,@localstatedir\@,$(localstatedir),g' \
32 +              -e 's,@sbindir\@,$(sbindir),g' \
33 +              -e 's,@mydatadir\@,$(mydatadir),g' \
34 +              -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
35                                                         < $< > $@ || rm $@
36  
37  alsa-state.service: alsa-state.service.in
38 diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
39 index 245a439..b017854 100644
40 --- a/alsactl/alsa-restore.service.in
41 +++ b/alsactl/alsa-restore.service.in
42 @@ -10,6 +10,7 @@ DefaultDependencies=no
43  After=alsa-state.service
44  Before=shutdown.target
45  Conflicts=shutdown.target
46 +ConditionPathExists=@localstatedir@/lib/alsa/asound.state
47  
48  [Service]
49  Type=oneshot
50 -- 
51 1.9.1
52