[Pkg-alsa-devel] Bug#932209: [ALSA] alsa-state.service starts daemon due to wrong ConditionPathExists
sch0rsch at arcor.de
sch0rsch at arcor.de
Tue Jul 16 16:12:59 BST 2019
Package: alsa-utils
Version: 1.1.8-2
Expected behaviour:
- alsa-state.service starts, if state-daemon.conf exists.
- alsa-restore.service starts, if state-daemon.conf does NOT exist.
Actual behaviour:
- Both systemd units start if state-daemon.conf exists.
- So alsactl daemon is always started on boot and can only prevent this
via "systemctl mask alsa-state" currently.
This does not match the explaining comments in both both systemd units
and it does not match version 1.1.3-1 (current Stretch package), nor the
source code, that was last changed 2017, so I could not open a pull
request to fix:
https://salsa.debian.org/alsa-team/alsa-utils/blob/debian/master/alsactl/alsa-state.service.in
I am not sure how this wrong code could find its way into
Buster+Bullseye+Sid repos, but it did:
https://deb.debian.org/debian/pool/main/a/alsa-utils/alsa-utils_1.1.8-2_amd64.deb
____________________________________
> systemctl cat alsa-state.service
# /lib/systemd/system/alsa-state.service
# 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)
Documentation=man:alsactl(1)
ConditionPathExists=!/etc/alsa/state-daemon.conf
After=sysinit.target
[Service]
Type=simple
ExecStart=-/usr/sbin/alsactl -E HOME=/run/alsa -s -n 19 -c rdaemon
ExecStop=-/usr/sbin/alsactl -E HOME=/run/alsa -s kill save_and_quit
____________________________________
> systemctl cat alsa-restore.service
# /lib/systemd/system/alsa-restore.service
#
# 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
Documentation=man:alsactl(1)
ConditionPathExists=!/etc/alsa/state-daemon.conf
ConditionPathExistsGlob=/dev/snd/control*
After=alsa-state.service
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=-/usr/sbin/alsactl -E HOME=/run/alsa restore
ExecStop=-/usr/sbin/alsactl -E HOME=/run/alsa store
____________________________________
Best regards
More information about the Pkg-alsa-devel
mailing list