blob: e99dd515f09615267dfc8b83983609c5445c90c1 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001From 43a56fa36a12f09ccd78b3cf5e6ae197fcab501f Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Fri, 29 Aug 2014 18:58:56 +0300
4Subject: [PATCH] alsactl: don't let systemd unit restore the volume when
5 asound.state is missing
6
7This avoids an error on bootup
8
9Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459
10
11Upstream-Status: Pending
12
13Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
14Signed-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
20diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
21index 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
38diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
39index 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--
511.9.1
52