summaryrefslogtreecommitdiff
path: root/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
blob: 477cd11b12a6989e279db4c8746e1f398339f765 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 37c99a3cbff36915b56a5703eeaed3c70796f80f Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Sun, 9 Oct 2011 20:06:35 +0200
Subject: [PATCH] alsactl: don't let systemd unit restore the volume when asound.state is missing

This avoids an error on bootup

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>

Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459

Upstream-Status: Pending

Index: alsa-utils-1.0.27.2/alsactl/Makefile.am
===================================================================
--- alsa-utils-1.0.27.2.orig/alsactl/Makefile.am
+++ alsa-utils-1.0.27.2/alsactl/Makefile.am
@@ -36,8 +36,8 @@ install-data-hook:
 endif
 
 edit = \
-	$(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
-		  -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
+	$(SED) -e 's,@localstatedir\@,$(localstatedir),g' -e 's,@sbindir\@,$(sbindir),g' \
+	       -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
 							< $< > $@ || rm $@
 
 alsa-state.service: alsa-state.service.in
Index: alsa-utils-1.0.27.2/alsactl/alsa-restore.service.in
===================================================================
--- alsa-utils-1.0.27.2.orig/alsactl/alsa-restore.service.in
+++ alsa-utils-1.0.27.2/alsactl/alsa-restore.service.in
@@ -10,6 +10,7 @@ DefaultDependencies=no
 After=alsa-state.service
 Before=shutdown.target
 Conflicts=shutdown.target
+ConditionPathExists=@localstatedir@/lib/alsa/asound.state
 
 [Service]
 Type=oneshot