alsactl: Check for state file existence in systemd unit
PATCH 1/1 alsactl: Check for state file existence in systemd unit
Date: Sat, 19 Oct 2013 10:12:19 +0000
Check for the existence of the state file, by default /var/lib/alsa/asound.state, before doing anything in the systemd service unit alsa-restore.service.
If the state file is not present, alsactl will fail with exit code 99.
---
Please apply with git am saved-messages.mbox.
alsactl/Makefile.am | 1 + alsactl/alsa-restore.service.in | 1 + 2 files changed, 2 insertions(+)
alsactl/Makefile.am +1 -0
@@ -40,6 +40,7 @@ endif edit = \ $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \ -e 's,@mydatadir\@,$(mydatadir),g' \ + -e 's,@asoundstatedir\@,$(ASOUND_STATE_DIR),g' \ -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \ < $< > $@ || rm $@
alsactl/alsa-restore.service.in +1 -0
@@ -7,6 +7,7 @@ Description=Save/Restore Sound Card State ConditionPathExists=!@daemonswitch@ ConditionPathExistsGlob=/dev/snd/control* +ConditionPathExists=@asoundstatedir@/asound.state After=alsa-state.service [Service]
Signature · 1 line
2.11.0
Quoted 7 lines · Paul Menzel
Date: Sat, 19 Oct 2013 10:12:19 +0000
Check for the existence of the state file, by default
/var/lib/alsa/asound.state, before doing anything in the systemd service unitalsa-restore.service.
Quoted 5 lines
If the state file is not present,
alsactlwill fail with exit code 99.Signed-off-by Paul Menzel <[email protected]>CC Jordi Mallach <[email protected]>
Well, but then this service won't be triggered for saving the state at shutdown if the state file isn't present beforehand, no?
Takashi
Quoted 33 lines
---
Please apply withgit am saved-messages.mbox.alsactl/Makefile.am | 1 + alsactl/alsa-restore.service.in | 1 + 2 files changed, 2 insertions(+)alsactl/Makefile.am +1
-0@@ -40,6 +40,7 @@ endif edit = \ $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \ -e 's,@mydatadir\@,$(mydatadir),g' \ + -e 's,@asoundstatedir\@,$(ASOUND_STATE_DIR),g' \ -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \ < $< > $@ || rm $@alsactl/alsa-restore.service.in +1
-0@@ -7,6 +7,7 @@ Description=Save/Restore Sound Card State ConditionPathExists=!@daemonswitch@ ConditionPathExistsGlob=/dev/snd/control* +ConditionPathExists=@asoundstatedir@/asound.state After=alsa-state.service [Service]Signature · 1 line
2.11.0