#!/bin/sh
if [ $(id -u) != 0 ]; then
 echo Error: You must be root to run this script!
 exit 1
fi
cd /usr/src
wget -Nc http://kano.mipooh.net/debian/knx-alsa_0.2-5_i386.deb
dpkg -i knx-alsa_0.2-5_i386.deb
/etc/init.d/alsa stop
perl -pi -e 's/^snd.*\n?//' /etc/modules
[ -f /etc/modules-2.6 ] && perl -pi -e 's/^snd.*\n?//' /etc/modules-2.6
rm -f /etc/modprobe.d/*alsa* /etc/modutils/*alsa* /etc/alsa/modutils/0.9
ln -s /etc/alsa/modutils/1.0 /etc/modprobe.d/alsa
ln -s /etc/alsa/modutils/1.0 /etc/modutils/alsa
ln -s /etc/alsa/modutils/1.0 /etc/alsa/modutils/0.9
update-modules
alsa_init
/etc/init.d/alsa start
echo "Hint: In case of non working sound reboot and check: lsmod|grep sound"
