[Pkg-alsa-devel] Bug#716755: add additional check to see if /usr/sbin/ is mounted before attempting to execute scripts from there

jidanni at jidanni.org jidanni at jidanni.org
Fri Jul 12 09:42:41 UTC 2013


Package: alsa-utils
Version: 1.0.27.1-1
File: /lib/udev/rules.d/90-alsa-restore.rules

Hello,

$ cat /lib/udev/rules.d/90-alsa-restore.rules
ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", GOTO="alsa_restore_go"
GOTO="alsa_restore_end"

LABEL="alsa_restore_go"
TEST!="/etc/alsa/state-daemon.conf", RUN+="/usr/sbin/alsactl restore $attr{number}"
TEST=="/etc/alsa/state-daemon.conf", RUN+="/usr/sbin/alsactl nrestore $attr{number}"

LABEL="alsa_restore_end"


The problem, according to http://forums.gentoo.org/viewtopic-t-914708-start-0.html
is now very clear:

You need to please wrap another larger test around those two lines that deal
with /usr/sbin/, to make sure it is mounted first before executing!
Something like if test -d /usr/sbin; then ...; fi, (but in the udev
language.)

Else the user will get alarming error messages during boot, even though
most users will run /etc/init.d/alsa-utils later anyway!

After you do this, please close #636437 which is getting too long!
Thanks!



More information about the Pkg-alsa-devel mailing list