[Pkg-alsa-devel] [Debian ALSA CVS] debian/alsa-driver/debian (3 files)
David B Harris
dbharris-guest@quantz.debian.org
Fri, 27 Feb 2004 01:17:53 +0100
Date: Friday, February 27, 2004 @ 01:17:53
Author: dbharris-guest
Path: /cvsroot/pkg-alsa/debian/alsa-driver/debian
Modified: alsa-base.conf alsa-base.init changelog
Cause mixer settings be saved (by default anyways) only when exiting runlevels 2 through 5, or when in one of those runlevels. This way mixer settings won't be saved in single-user mode, when they haven't been restored and are all muted.
----------------+
alsa-base.conf | 11 +++++++++++
alsa-base.init | 16 ++++++++++------
changelog | 8 +++++++-
3 files changed, 28 insertions(+), 7 deletions(-)
Index: debian/alsa-driver/debian/alsa-base.conf
diff -u debian/alsa-driver/debian/alsa-base.conf:1.2 debian/alsa-driver/debian/alsa-base.conf:1.3
--- debian/alsa-driver/debian/alsa-base.conf:1.2 Fri Nov 28 07:07:22 2003
+++ debian/alsa-driver/debian/alsa-base.conf Fri Feb 27 01:17:53 2004
@@ -13,3 +13,14 @@
# /etc/init.d/alsa stop or restart by killing all of running
# applications which use sound devices.
#ALSA_KILL_MODE="force"
+
+# runlevels_save is used to determine in which runlevels (and from which
+# runlevels) mixer settings will be saved. The default value of '[2-5]' will
+# cause mixer settings to be saved whenever the system is in any regular
+# runlevel (2 through 5), or when the last runlevel was any regular runlevel.
+# The end result of this is that mixer settings won't be saved if you're
+# rebooting your system from single-user mode (which is a good thing as all
+# the mixer levels will be 0, resulting in muted sound on the next reboot).
+# Valid syntax same as a regular expression character range, with the
+# restriction that only valid runlevels are allowed.
+runlevels_save='[2-5]'
Index: debian/alsa-driver/debian/alsa-base.init
diff -u debian/alsa-driver/debian/alsa-base.init:1.40 debian/alsa-driver/debian/alsa-base.init:1.41
--- debian/alsa-driver/debian/alsa-base.init:1.40 Fri Feb 27 00:21:49 2004
+++ debian/alsa-driver/debian/alsa-base.init Fri Feb 27 01:17:53 2004
@@ -36,6 +36,7 @@
# Populate some defaults in case /etc/default/alsa goes for a wander.
force_stop_modules_before_suspend="false"
alsactl_store_on_shutdown="true"
+runlevels_save='[2-5]'
[ -e /etc/default/alsa ] && . /etc/default/alsa
# $ALSA_KILL_OVERRIDE is only for use by this script, please don't set it
@@ -116,12 +117,15 @@
stop)
if [ -d /proc/asound ]; then
if [ "$alsactl_store_on_shutdown" = "true" ]; then
- printf "Storing ALSA mixer settings ... "
- if alsactl store > /dev/null 2>&1; then
- sleep 1
- echo "done."
- else
- echo "failed"
+ if runlevel | grep -E "^$runlevels_save " > /dev/null 2>&1 \
+ || runlevel | grep -E " $runlevels_save\$" > /dev/null 2>&1; then
+ printf "Storing ALSA mixer settings ... "
+ if alsactl store > /dev/null 2>&1; then
+ sleep 1
+ echo "done."
+ else
+ echo "failed"
+ fi
fi
fi
Index: debian/alsa-driver/debian/changelog
diff -u debian/alsa-driver/debian/changelog:1.210 debian/alsa-driver/debian/changelog:1.211
--- debian/alsa-driver/debian/changelog:1.210 Fri Feb 27 00:33:16 2004
+++ debian/alsa-driver/debian/changelog Fri Feb 27 01:17:53 2004
@@ -15,9 +15,15 @@
- debian/control (alsa-base): Add version to alsa-utils dependency,
1.0.2-2, so that the postinst's running of alsactl gets its state from
the new location (/var/lib/alsa/asound.state)
+ - debian/alsa-base.conf, debian/alsa-base.init: Add support to set the
+ runlevels within which mixer settings will be saved (the same setting is
+ also used to determine *from* which runlevels we'll be saving mixer
+ settings). Now if you boot into single-user mode and reboot right from
+ there, mixer settings won't be saved (so on your next mute you'll have
+ your normal levels, not all-muted). (Closes: #233974)
* Unreleased.
- -- David B. Harris <dbharris@debian.org> Thu, 26 Feb 2004 18:33:14 -0500
+ -- David B. Harris <dbharris@debian.org> Thu, 26 Feb 2004 19:16:13 -0500
alsa-driver (1.0.2c-3) unstable; urgency=low