summaryrefslogtreecommitdiff
path: root/alsactl/90-alsa-restore.rules.in
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2013-04-10 10:23:16 +0200
committerJaroslav Kysela <perex@perex.cz>2013-04-10 10:29:19 +0200
commit8b34bf25c02693899b03768b0eef628eb1d7bb6e (patch)
tree69e4a60eb54b033f17029dc5aa6d39d4a825ec59 /alsactl/90-alsa-restore.rules.in
parent611249ae26f435429dbe1894e210704a723ee277 (diff)
alsactl: revert back old systemd static units with the /etc/alsa/state-daemon.conf switch
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'alsactl/90-alsa-restore.rules.in')
-rw-r--r--alsactl/90-alsa-restore.rules.in10
1 files changed, 8 insertions, 2 deletions
diff --git a/alsactl/90-alsa-restore.rules.in b/alsactl/90-alsa-restore.rules.in
index fe0e1ed..3ce9a65 100644
--- a/alsactl/90-alsa-restore.rules.in
+++ b/alsactl/90-alsa-restore.rules.in
@@ -1,2 +1,8 @@
-ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS=="card*", \
- RUN+="@sbindir@/alsactl nrestore $attr{number}"
+ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", GOTO="alsa_restore_go"
+GOTO="alsa_restore_end"
+
+LABEL="alsa_restore_go"
+TEST!="/etc/alsa/state-daemon.conf", RUN+="@sbindir@/alsactl restore $attr{number}"
+TEST=="/etc/alsa/state-daemon.conf", RUN+="@sbindir@/alsactl nrestore $attr{number}"
+
+LABEL="alsa_restore_end"