#
# Sound driver removal script
#
TMP=/tmp/sound.err
ERR1=" Errors have been written to the file $TMP."
ERR2=" The Sound Driver software was not successfully removed."

echo "Removing Sound Driver Package"

/etc/conf/bin/idcheck -p snd 2>$TMP
if [ $? != 0 ]
then
	echo "The sound package is at least partly installed.
	Removing it now..."
	/etc/conf/bin/idinstall -d snd
fi

/etc/conf/bin/idbuild 2>>$TMP
if [ $? != 0 ]
then
	message "There was an error during kernel reconfiguration. $ERR1 $ERR2"
	exit 1
fi

rm -f $TMP

echo "Sound Driver removed. Remember to reboot"
