mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:05:41 +01:00
alsactl: Only start restore service when asoundrc file exists
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>
This commit is contained in:
parent
d0802f32ca
commit
f1eba0b5de
2 changed files with 2 additions and 0 deletions
|
@ -41,6 +41,7 @@ edit = \
|
|||
$(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
|
||||
-e 's,@mydatadir\@,$(mydatadir),g' \
|
||||
-e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
|
||||
-e 's,@asoundrcfile\@,$(ASOUND_STATE_DIR)/asound.state,g' \
|
||||
< $< > $@ || rm $@
|
||||
|
||||
alsa-state.service: alsa-state.service.in
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
Description=Save/Restore Sound Card State
|
||||
ConditionPathExists=!@daemonswitch@
|
||||
ConditionPathExistsGlob=/dev/snd/control*
|
||||
ConditionPathExists=@asoundrcfile@
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
|
Loading…
Reference in a new issue