mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 04:45:42 +01:00
7d6673cc13
With RemainAfterExit=true, we can manage both save and restore of the card state in a single unit file. This will fix also the case where systemd reloads the service; with two individual units, it will restore the previous state before saving, and may lead to inconsistent state suddenly. Also fix alsa-state.service as well to make both start and stop working in a simpler way. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=929619 Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 lines
397 B
SYSTEMD
14 lines
397 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=Manage Sound Card State (restore and store)
|
|
ConditionPathExists=@daemonswitch@
|
|
After=sysinit.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
ExecStart=-@sbindir@/alsactl -s -n 19 -c rdaemon
|
|
ExecStop=-@sbindir@/alsactl -s kill save_and_quit
|