File: udev_test_alsactl.patch

package info (click to toggle)
alsa-utils 1.2.15-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,748 kB
  • sloc: ansic: 48,123; sh: 7,881; makefile: 603; xml: 590; sed: 16
file content (22 lines) | stat: -rw-r--r-- 1,572 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Author: Jordi Mallach <jordi@debian.org>
Description: Test for availability of alsactl before restoring.
 Add a test to the udev ruleset to check for /usr/sbin/alsactl, as it might
 not be available at boot time on separate /usr systems.
Forwarded: no
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=713916

Index: alsa-utils/alsactl/conf/90-alsa-restore.rules.in
===================================================================
--- alsa-utils.orig/alsactl/conf/90-alsa-restore.rules.in
+++ alsa-utils/alsactl/conf/90-alsa-restore.rules.in
@@ -24,8 +24,8 @@ IMPORT{program}="/usr/bin/cat /run/udev/
 ENV{ALSA_CARD_HDA_ANALOG}!="", ENV{ALSA_CARD_NUMBER}="$env{ALSA_CARD_HDA_ANALOG}"
 
 LABEL="alsa_restore_std"
-TEST!="@daemonswitch@", IMPORT{program}="@sbindir@/alsactl@args@ --export -E HOME=@alsactlhome@ -E XDG_RUNTIME_DIR=@alsactlruntime@ restore $env{ALSA_CARD_NUMBER}"
-TEST=="@daemonswitch@", IMPORT{program}="@sbindir@/alsactl@args@ --export -E HOME=@alsactlhome@ -E XDG_RUNTIME_DIR=@alsactlruntime@ nrestore $env{ALSA_CARD_NUMBER}"
+TEST!="@daemonswitch@", TEST=="/usr/sbin/alsactl", IMPORT{program}="@sbindir@/alsactl@args@ --export -E HOME=@alsactlhome@ -E XDG_RUNTIME_DIR=@alsactlruntime@ restore $env{ALSA_CARD_NUMBER}"
+TEST=="@daemonswitch@", TEST=="/usr/sbin/alsactl", IMPORT{program}="@sbindir@/alsactl@args@ --export -E HOME=@alsactlhome@ -E XDG_RUNTIME_DIR=@alsactlruntime@ nrestore $env{ALSA_CARD_NUMBER}"
 ENV{ALSA_CARD_STATE}=="waiting", ENV{SYSTEMD_WANTS}="alsa-card-wait@$env{ALSA_CARD_NUMBER}.service"
 
 LABEL="alsa_restore_end"