mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-28 05:29:48 +00:00
a55f0a98ba
* Audigy 2 / Audigy 2 Value fixes, full support for SB0400 Audigy 2 Value * Workaround for bad AC97 'rec' volume emulation * 4.x build fix * rc.d/emuctrl.sh script that saves card parameters * Improved documentation PR: ports/87772 Submitted by: Michael Seyfert <michaels@sdf.lonestar.org> (maintainer) - Install kernel module into /boot/modules instead of /boot/kernel PR: ports/87541 Submitted by: Bjorn Konig <bkoenig@cs.tu-berlin.de> Approved by: Michael Seyfert <michaels@sdf.lonestar.org> (maintainer)
35 lines
1006 B
Bash
35 lines
1006 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/modules/$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
|
|
|
|
# Tell the user about the state files
|
|
if [ -f /var/db/emu10kx0-state ]; then
|
|
echo "If you will not be using this port anymore, please remove " /var/db/emu10kx[0-9]-state " manually."
|
|
fi
|
|
#============================================================
|