freebsd-ports/audio/emu10kx/pkg-deinstall
Vsevolod Stakhov 8b0303d490 Add emu10kx driver for SBlive, Audigy and Audigy2 based cards.
This driver is alternative to snd_emu10k1 and support complex
mixer settings, analog/digital switch, S/PDIF passthrough

PR:		84653
Submitted by:	michaels@sdf.lonestar.org
2005-09-16 11:41:55 +00:00

29 lines
818 B
Bash

#!/bin/sh
[ "$2" != "DEINSTALL" ] && exit 0
#============================================================
# DEINSTALL
#============================================================
DRIVERNAME=snd_emu10kx
# Unload the driver
kldstat -n $DRIVERNAME > /dev/null 2>&1; RESULT=$?
if [ ${RESULT} -eq 0 ]; then
kldunload -n $DRIVERNAME > /dev/null 2>&1; RESULT=$?
if [ ${RESULT} -ne 0 ]; then
echo "ERROR: Failed to unload the $DRIVERNAME module!"
echo "ERROR: Is $DRIVERNAME.ko in use?"
exit 1;
fi
fi
# Remove the driver
rm /boot/kernel/$DRIVERNAME.ko
# Remove the driver from loader.conf
grep ${DRIVERNAME}_load /boot/loader.conf > /dev/null 2>&1; RESULT=$?
if [ ${RESULT} -eq 0 ]; then
sed -e /${DRIVERNAME}_load.*/d -i.orig /boot/loader.conf
fi
#============================================================