[Pkg-alsa-devel] Bug#188595: Yes, there may be a problem

Thomas Hood Thomas Hood <jdthood@aglu.demon.nl>, 188595@bugs.debian.org
Wed, 01 Sep 2004 22:15:36 +0200


The submitter said:
> It is annoying to have to reset the PC Speaker settings and resave
> them after every alsa-driver update.


alsa-base.postinst contains this code which only runs on "configure":

if [ -z "$alsactl_store_on_shutdown" -o "$alsactl_store_on_shutdown" = 'true' ]; then
    alsactl store >/dev/null 2>&1 || true
fi

Why does postinst configure do an 'alsactl store'?  Is this to create
an asound.state file if the latter is not present?  If so then it would
be best to condition on the absence of the file so that existing files
are not overwritten.

if [ -z "$alsactl_store_on_shutdown" -o "$alsactl_store_on_shutdown" = 'true' ]; then
    [ -f /var/lib/alsa/asound.state ] || alsactl store >/dev/null 2>&1 || true
fi

Note that the code tests for the value 'true' whereas the initial
setting of the variable in the initscript is "autosave always".
I am not sure which of these values one is supposed to use in order
to enable alsactl storage.

--
Thomas Hood