From: Paul Menzel <paulepanter@users.sourceforge.net>
To: alsa-devel@alsa-project.org
Cc: Jordi Mallach <jordi@debian.org>
Subject: [PATCH] alsactl: Make homedir configurable
Date: Tue, 27 Dec 2016 17:15:27 +0100 [thread overview]
Message-ID: <1482855327.3916.204.camel@users.sourceforge.net> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 3650 bytes --]
Date: Sat, 19 Oct 2013 10:12:19 +0000
Add new configure switch to set alsactl's homedir. This is used to avoid
that a directory `.pulse` is created by the init script, when PulseAudio
is installed [1].
[1] https://bugs.debian.org/712980
"alsa-utils startup script creates /.pulse files ("Failed to create
secure directory") when pulseaudio is installed"
CC: Jordi Mallach <jordi@debian.org>
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
---
Please apply with `git am saved-messages.mbox`.
alsactl/90-alsa-restore.rules.in | 4 ++--
alsactl/Makefile.am | 1 +
alsactl/alsa-restore.service.in | 4 ++--
alsactl/alsa-state.service.in | 4 ++--
configure.ac | 6 ++++++
5 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/alsactl/90-alsa-restore.rules.in b/alsactl/90-alsa-restore.rules.in
index c0c1b23..95b26c4 100644
--- a/alsactl/90-alsa-restore.rules.in
+++ b/alsactl/90-alsa-restore.rules.in
@@ -2,7 +2,7 @@ ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", TEST==
GOTO="alsa_restore_end"
LABEL="alsa_restore_go"
-TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl restore $attr{device/number}"
-TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl nrestore $attr{device/number}"
+TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl -E HOME=@alsactlhome@ restore $attr{device/number}"
+TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl -E HOME=@alsactlhome@ nrestore $attr{device/number}"
LABEL="alsa_restore_end"
diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
index cac8094..d03137b 100644
--- a/alsactl/Makefile.am
+++ b/alsactl/Makefile.am
@@ -40,6 +40,7 @@ endif
edit = \
$(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
-e 's,@mydatadir\@,$(mydatadir),g' \
+ -e 's,@alsactlhome\@,$(ALSACTL_HOME_DIR),g' \
-e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
< $< > $@ || rm $@
diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
index 2884098..23dece8 100644
--- a/alsactl/alsa-restore.service.in
+++ b/alsactl/alsa-restore.service.in
@@ -12,6 +12,6 @@ After=alsa-state.service
[Service]
Type=oneshot
RemainAfterExit=true
-ExecStart=-@sbindir@/alsactl restore
-ExecStop=-@sbindir@/alsactl store
+ExecStart=-@sbindir@/alsactl -E HOME=@alsactlhome@ restore
+ExecStop=-@sbindir@/alsactl -E HOME=@alsactlhome@ store
StandardOutput=syslog
diff --git a/alsactl/alsa-state.service.in b/alsactl/alsa-state.service.in
index f1321d6..28e3043 100644
--- a/alsactl/alsa-state.service.in
+++ b/alsactl/alsa-state.service.in
@@ -10,5 +10,5 @@ After=sysinit.target
[Service]
Type=simple
-ExecStart=-@sbindir@/alsactl -s -n 19 -c rdaemon
-ExecStop=-@sbindir@/alsactl -s kill save_and_quit
+ExecStart=-@sbindir@/alsactl -E HOME=@alsactlhome@ -s -n 19 -c rdaemon
+ExecStop=-@sbindir@/alsactl -E HOME=@alsactlhome@ -s kill save_and_quit
diff --git a/configure.ac b/configure.ac
index 69ff2ab..8cbf798 100644
--- a/configure.ac
+++ b/configure.ac
@@ -409,6 +409,12 @@ AC_ARG_WITH([alsactl-pidfile-dir],
[ALSACTL_PIDFILE_DIR="/var/run"])
AC_SUBST(ALSACTL_PIDFILE_DIR)
+AC_ARG_WITH([alsactl-home-dir],
+ AS_HELP_STRING([--with-alsactl-home-dir=DIR], [Directory to use as homedir for alsactl]),
+ [ALSACTL_HOME_DIR="$withval"],
+ [ALSACTL_HOME_DIR="/var/run/alsa"])
+AC_SUBST(ALSACTL_HOME_DIR)
+
AC_ARG_WITH([alsactl-daemonswitch],
AS_HELP_STRING([--with-alsactl-daemonswitch=FILE], [File to test for the daemon mode]),
[ALSACTL_DAEMONSWITCH="$withval"],
--
2.11.0
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next reply other threads:[~2016-12-27 16:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-27 16:15 Paul Menzel [this message]
2016-12-28 16:06 ` [PATCH] alsactl: Make homedir configurable 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=1482855327.3916.204.camel@users.sourceforge.net \
--to=paulepanter@users.sourceforge.net \
--cc=alsa-devel@alsa-project.org \
--cc=jordi@debian.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.