#! /bin/sh

if [ ! -f /proc/pci -a ! -d /proc/bus/pci ]; then
	echo "I'm sorry, but to use ALSA you need a kernel with PCI-support"
	echo "enabled."
	echo
	echo -n "Press [enter] to continue "
	read HITME
fi

if [ -f /etc/modutils/alsa ]; then
	exit 0
fi

if grep -q '### BEGIN ALSA SETUP ###' /etc/conf.modules; then
	echo "I found an existing ALSA-configuration in /etc/conf.modules. I will"
	echo "extract that and move it to the new location (/etc/modutils/alsa)."

	sed -e '/### BEGIN ALSA SETUP ###/,\/### END ALSA SETUP ###/d' /etc/conf.modules > /etc/modutils/alsa
fi

