[Pkg-oss4-maintainers] Bug#833092: State file legacy_devices is always overwritten by ossdevlinks and serves no use
Klaus Ethgen
Klaus at Ethgen.de
Sun Jul 31 19:35:53 UTC 2016
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Package: oss4-base
Version: 4.2-build2010-5.1~ket
Severity: normal
I have my own configuration of oss legacy links cause the default does
not work correctly. So I configured that in /var/lib/oss4/legacy_devices
as it is documented.
Unfortunately, the init script calls ossdevlinks _before_ it is running
legacy_devices. But ossdevlinks does recreate legacy_devices at the end
of every run.
So, with this order in init file, the legacy_devices file is of no use
and gets overwritten all time.
- -- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.5.7 (SMP w/8 CPU cores)
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages oss4-base depends on:
ii libc6 2.23-4
Versions of packages oss4-base recommends:
pn pm-utils <none>
Versions of packages oss4-base suggests:
ii oss4-modules-4.5.7 [oss4-modules] 4.2-build2010-5.1~ket+1.ikki
- -- Configuration Files:
/etc/init.d/oss4-base changed:
OSSETCDIR=/etc/oss4
OSSVARDIR=/var/lib/oss4
. /etc/oss.conf
. /lib/lsb/init-functions
test -x /usr/sbin/ossdetect || exit 0
echo_procs_using_sound()
{
echo $( fuser /dev/mixer* /dev/dsp* /dev/midi* /dev/oss/*/* 2>/dev/null )
}
kill_procs_using_sound()
{
procs_using_sound="$(echo_procs_using_sound)"
if [ "$procs_using_sound" ] ; then
echo -n "Terminating processes:"
for attempt in 1 2 3 4 ; do
echo -n " ${procs_using_sound}"
kill $procs_using_sound || :
sleep 1
procs_using_sound="$(echo_procs_using_sound)"
[ "$procs_using_sound" ] || break
done
# Either no more procs using sound or attempts ran out
if [ "$procs_using_sound" ] ; then
echo -n " (with SIGKILL:) ${procs_using_sound}"
kill -9 $procs_using_sound || :
sleep 1
fi
procs_using_sound="$(echo_procs_using_sound)"
if [ "$procs_using_sound" ] ; then
echo " (failed: processes still using sound devices: $(echo_with_command_names $procs_using_sound))."
return 1
fi
echo "."
fi
return 0
}
unload_modules()
{
procs_using_sound="$(echo_procs_using_sound)"
if test "$procs_using_sound " != " "
then
log_action_end_msg 2 'Some applications are still using OSS'
exit 2
fi
# Unload oss drivers
for n in `cat $OSSETCDIR/installed_drivers | sed 's/#.*//'`
do
if ! /sbin/rmmod $n
then
log_warning_msg "Unloading module $n failed - ignored"
fi
done
if ! /sbin/rmmod osscore
then
log_action_end_msg 3 'Cannot unload the OSS driver modules'
exit 3
fi
}
case "$1" in
start)
log_begin_msg 'Starting Open Sound System: '
# Check if OSS is already running
if test -f /proc/opensound/devfiles
then
log_action_end_msg 0 'OSS is already loaded'
exit 0
fi
# Check if oss kernel modules are installed
if ! test -f /lib/modules/`uname -r`/kernel/oss4/osscore.ko && ! test -f /lib/modules/`uname -r`/updates/dkms/osscore.ko
then
log_action_end_msg 1 'No kernel modules detected'
exit 0
fi
# Detect hardware
if ! test -f $OSSETCDIR/installed_drivers
then
/usr/sbin/ossdetect -v
fi
if ! test -f $OSSETCDIR/installed_drivers
then
log_action_end_msg 10 "No $OSSETCDIR/installed_drivers - cannot continue (problem with ossdetect?)"
exit 10
fi
# Load osscore
OPTIONS=
if test -f $OSSETCDIR/conf/osscore.conf
then
OPTIONS="`grep -v -h '^#' $OSSETCDIR/conf/osscore.conf|sed 's/ //g'`"
fi
if ! /sbin/modprobe osscore $OPTIONS
then
log_action_end_msg 60 "Cannot load the osscore module"
exit 60
fi
# Load oss drivers
for n in `cat $OSSETCDIR/installed_drivers | sed 's/#.*//'`
do
OPTIONS=
if test -f $OSSETCDIR/conf/$n.conf
then
OPTIONS="`grep -v -h '^#' $OSSETCDIR/conf/$n.conf|sed 's/ //g'`"
fi
if ! /sbin/modprobe $n $OPTIONS
then
log_warning_msg "Loading module $n failed - ignored"
fi
done
# Check if everything is OK
if ! test -f /proc/opensound/devfiles
then
log_action_end_msg 70 'OSS Core module refused to start'
exit 70
fi
# Create device file
/usr/sbin/ossdetect -d -m 660 -g audio
# Create basic links
/usr/sbin/ossdevlinks
if test -f $OSSVARDIR/legacy_devices
then
sh $OSSVARDIR/legacy_devices
fi
if test -f $OSSVARDIR/soundon.user
then
sh $OSSVARDIR/soundon.user
elif test -f $OSSETCDIR/soundon.user
then
sh $OSSETCDIR/soundon.user
fi
/usr/sbin/savemixer -L
log_action_end_msg 0
;;
stop)
log_begin_msg 'Stopping Open Sound System: '
if ! test -f /proc/opensound/devfiles
then
log_action_end_msg 0 'OSS not loaded'
exit 0
fi
/usr/sbin/savemixer
log_action_end_msg 0
;;
unload)
log_begin_msg 'Unloading Open Sound System kernel modules: '
if ! test -f /proc/opensound/devfiles
then
log_action_end_msg 0 'OSS not loaded'
exit 0
fi
/usr/sbin/savemixer
unload_modules
log_action_end_msg 0
;;
force-unload)
log_begin_msg 'Unloading Open Sound System kernel modules: '
if ! test -f /proc/opensound/devfiles
then
log_action_end_msg 0 'OSS not loaded'
exit 0
fi
/usr/sbin/savemixer
kill_procs_using_sound
unload_modules
log_action_end_msg 0
;;
restart)
$0 stop
sleep 1
$0 start
;;
force-reload)
$0 force-unload
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|unload|force-unload|restart|force-reload}"
exit 3
esac
/etc/oss4/conf/oss_hdaudio.conf changed:
hdaudio_jacksense=0
hdaudio_noskip=1
/etc/oss4/conf/osscore.conf changed:
vmix_no_autoattach=1
- -- no debconf information
- --
Klaus Ethgen http://www.ethgen.ch/
pub 4096R/4E20AF1C 2011-05-16 Klaus Ethgen <Klaus at Ethgen.ch>
Fingerprint: 85D4 CA42 952C 949B 1753 62B3 79D0 B06F 4E20 AF1C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Charset: ISO-8859-1
iQGcBAEBCgAGBQJXnlMQAAoJEKZ8CrGAGfashpEMAIXiqGUpfEgksGzkvgcvoXWC
pilJ8ToH3CoVFiadHMmAq+4bCB32vauzuJSfSwaqfEsPtvLdXCvFP0ohs2IIAync
4nd4c8x39DjjmWUEEvSwb7BSPageGn7GqK+RSV5RReCgA40pV6wt3SdSqnyVz3nk
EKtZF/99SwPsK8onU8IJIA4o31ZsYV90PnNvFj9o4W8JNaGQ4YX6G0DaHxzAZnr6
x8tWHFVj3wF7tP7Bs7Aohp7YBZobzPJPPch67XoIALhVtOUt/TtdljkPaHfzGRSD
GtW/FHFywzaIs/PB3h5vpagBsMgBluXaZVw/Ucx1hW00H65OEoPzmuh1eIoGxYFE
Uekqm+0QD6faH20TMpls9Vmjs+6ZWcjLUJeY86bAJipk95ux2sl7eT+ZR9puq3Gh
fFImPISwB1ZIY6/IsW2SF0yNY6UC9Xy8a2EGD/PWH4361P0E/T0EWh4JjNQiXcEo
1gZuNKw5mS9t6cPiopVO5InDNS3OW6ncewtjGr7w+A==
=YcxQ
-----END PGP SIGNATURE-----
More information about the Pkg-oss4-maintainers
mailing list