[Pkg-alsa-devel] Bug#238994: alsa-base: /etc/apm.event.d/alsa is buggy
Marius Gedminas
Marius Gedminas <mgedmin@b4net.lt>, 238994@bugs.debian.org
Sat, 20 Mar 2004 04:53:01 +0200
Package: alsa-base
Version: 1.0.3-1
Severity: normal
/etc/apm/event.d/alsa contains the following snippet:
kill -STOP $(fuser $devices) | cut -d: -f2 | tr '\n' ' '
This is a very unreliable way of stopping processes that use sound devices:
1) cut and tr should be applied to the output of fuser, not the output
of kill
2) the output of fuser includes things like '22228m' which are not
valid pids
I suggest replacing that line with a simple
fuser -k -STOP $devices
The same applies to kill -CONT ... near the bottom of the script.
Another problem is that $devices does not contain all ALSA devices. The
ones in /dev/snd have a different major number (116 instead of 14).
If this is not an intentional omission, I suggest replacing
devices=$(find /dev -type c | xargs stat -c '%t %n' | sed -n 's/^e //p')
near the top of the script with
devices=$(find /dev -type c | xargs stat -c '%t %n' | sed -n 's/^e //p; s/^74 //p')
-- System Information:
Debian Release: 3.0
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.24-mg2
Locale: LANG=C, LC_CTYPE=lt_LT.UTF-8
Versions of packages alsa-base depends on:
ii alsa-utils 1.0.3-1 Advanced Linux Sound Architecture
ii debconf 1.4.16 Debian configuration management sy
ii debianutils 2.7.2 Miscellaneous utilities specific t
ii lsof 4.70-1 List open files.
ii module-init-tools 3.0-pre10-1 tools for managing Linux kernel mo
ii modutils 2.4.26-1 Linux module utilities
ii procps 1:3.2.0-1 The /proc file system utilities
ii psmisc 21.4-1 Utilities that use the proc filesy
-- debconf information:
alsa-common/card-list:
* alsa-base/alsactl_store_on_shutdown: true
* alsa-base/current_card: done
* alsa-base/force_stop_alsa_before_suspend: stop-procs
* alsa-base/card_list: intel8x0 done
Marius Gedminas
--
MCSE == Minesweeper Consultant / Solitaire Expert