mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:15:43 +01:00
f1eba0b5de
This solves the chicken and egg problem on fresh installations whereby the alsa state file does not yet exist, and alsa-restore unit attempted to launch without first having a state file. Signed-off-by: Ikey Doherty <ikey@solus-project.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 lines
434 B
SYSTEMD
16 lines
434 B
SYSTEMD
#
|
|
# Note that two different ALSA card state management schemes exist and they
|
|
# can be switched using a file exist check - /etc/alsa/state-daemon.conf .
|
|
#
|
|
|
|
[Unit]
|
|
Description=Save/Restore Sound Card State
|
|
ConditionPathExists=!@daemonswitch@
|
|
ConditionPathExistsGlob=/dev/snd/control*
|
|
ConditionPathExists=@asoundrcfile@
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=true
|
|
ExecStart=-@sbindir@/alsactl restore
|
|
ExecStop=-@sbindir@/alsactl store
|