From: Ikey Doherty <ikey@solus-project.com>
To: alsa-devel@alsa-project.org
Subject: [PATCH] alsactl: Only start restore service when asoundrc file exists
Date: Tue, 12 Dec 2017 13:32:34 +0000 [thread overview]
Message-ID: <20171212133234.20712-1-ikey@solus-project.com> (raw)
This solves the chicken and egg problem on fresh installations whereby
the alsa state file does not yet exist, and alsa-restore unit attempted
to launch without first having a state file.
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
---
alsactl/Makefile.am | 1 +
alsactl/alsa-restore.service.in | 1 +
2 files changed, 2 insertions(+)
diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
index 90fab9d..aaaf74e 100644
--- a/alsactl/Makefile.am
+++ b/alsactl/Makefile.am
@@ -41,6 +41,7 @@ edit = \
$(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
-e 's,@mydatadir\@,$(mydatadir),g' \
-e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
+ -e 's,@asoundrcfile\@,$(ASOUND_STATE_DIR)/asound.state,g' \
< $< > $@ || rm $@
alsa-state.service: alsa-state.service.in
diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
index 80fd5fd..a84c2e8 100644
--- a/alsactl/alsa-restore.service.in
+++ b/alsactl/alsa-restore.service.in
@@ -7,6 +7,7 @@
Description=Save/Restore Sound Card State
ConditionPathExists=!@daemonswitch@
ConditionPathExistsGlob=/dev/snd/control*
+ConditionPathExists=@asoundrcfile@
[Service]
Type=oneshot
--
2.15.1
next reply other threads:[~2017-12-12 13:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-12 13:32 Ikey Doherty [this message]
2017-12-14 10:25 ` [PATCH] alsactl: Only start restore service when asoundrc file exists Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171212133234.20712-1-ikey@solus-project.com \
--to=ikey@solus-project.com \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox