summaryrefslogtreecommitdiff
path: root/alsactl
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-08-10 14:42:24 +0200
committerTakashi Iwai <tiwai@suse.de>2015-08-10 14:42:24 +0200
commit0e864e1a3aaf79d451556064eb09052530a0a085 (patch)
tree46ddef6956d3a2342d5c3f740cbe8099cb298c7e /alsactl
parentff9b070d9cb5e63c31be31cdb18350d5810138c0 (diff)
downloadalsa-utils-0e864e1a3aaf79d451556064eb09052530a0a085.tar.gz
alsactl: Add path condition to alsa-store and alsa-restore services
With alsa-restore.service and alsa-store.service, systemd invokes alsactl at boot and shutdown times. When this is invoked on a system without sound cards, it results in an ugly error message from alsact /usr/sbin/alsactl: save_state:1590: No soundcards found... return code is "19" Add ConditionPathExistsGlob checks of /dev/snd/control* devices for avoiding unnecessary invocations of alsactl on such a system. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=940950 Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'alsactl')
-rw-r--r--alsactl/alsa-restore.service.in1
-rw-r--r--alsactl/alsa-store.service.in1
2 files changed, 2 insertions, 0 deletions
diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
index 245a439..d1a74d6 100644
--- a/alsactl/alsa-restore.service.in
+++ b/alsactl/alsa-restore.service.in
@@ -6,6 +6,7 @@
[Unit]
Description=Restore Sound Card State
ConditionPathExists=!@daemonswitch@
+ConditionPathExistsGlob=/dev/snd/control*
DefaultDependencies=no
After=alsa-state.service
Before=shutdown.target
diff --git a/alsactl/alsa-store.service.in b/alsactl/alsa-store.service.in
index f1a56bb..c89cfff 100644
--- a/alsactl/alsa-store.service.in
+++ b/alsactl/alsa-store.service.in
@@ -6,6 +6,7 @@
[Unit]
Description=Store Sound Card State
ConditionPathExists=!@daemonswitch@
+ConditionPathExistsGlob=/dev/snd/control*
DefaultDependencies=no
Before=shutdown.target