[alsa-devel] [PATCH] alsactl: Check existence of `alsactl` in udev rule

Paul Menzel paulepanter at users.sourceforge.net
Wed Dec 28 23:31:15 CET 2016


From: Jordi Mallach <jordi at debian.org>
Date: Thu, 10 Jan 2013 00:17:58 +0000

Include the line `TEST=="/usr/sbin/alsactl"` in the udev rule, to
properly fix the state restoring for users with split `/usr`
filesystems
[1].

Upstream the patch from the Debian package [2].

[1] https://bugs.debian.org/670490
    "Debian Bug report logs - #670490 alsa-utils: Restore sound volume
     in udev"
[2] https://sources.debian.net/src/alsa-utils/1.1.2-1/debian/patches/udev_test_alsactl.patch/

Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
CC: Jordi Mallach <jordi at debian.org>
---
Please apply with `git am saved-messages.mbox`.

 alsactl/90-alsa-restore.rules.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/alsactl/90-alsa-restore.rules.in b/alsactl/90-alsa-restore.rules.in
index c0c1b23..f190b85 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@", TEST=="@sbindir@/alsactl", RUN+="@sbindir@/alsactl restore $attr{device/number}"
+TEST=="@daemonswitch@", TEST=="@sbindir@/alsactl", RUN+="@sbindir@/alsactl nrestore $attr{device/number}"
 
 LABEL="alsa_restore_end"
-- 
2.11.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20161228/8e1dd845/attachment.sig>


More information about the Alsa-devel mailing list