# $FreeBSD$ # COMMENT = Ports to help disabled users SUBDIR += accerciser SUBDIR += at-poke SUBDIR += at-spi SUBDIR += at-spi-reference SUBDIR += atk SUBDIR += atk-reference SUBDIR += dasher SUBDIR += eflite SUBDIR += gail SUBDIR += gail-reference SUBDIR += gnome-mag SUBDIR += gnome-speech SUBDIR += gnopernicus SUBDIR += gok SUBDIR += java-access-bridge SUBDIR += kdeaccessibility SUBDIR += kdeaccessibility4 SUBDIR += linux-atk SUBDIR += mousetweaks SUBDIR += orca SUBDIR += py-papi SUBDIR += qt4-accessible SUBDIR += ruby-atk SUBDIR += yasr .include 'vcs-git' href='https://phantom.tfcis.org/~lantw44/git/freebsd-ports-graphics' title='freebsd-ports-graphics Git repository'/>
aboutsummaryrefslogblamecommitdiffstats
blob: 351b8469a5362a7c907e144ae887ad43fcc4fb9b (plain) (tree)




















                                                                      
                               





                                                                     




                                                                                                         
                                                             
#!/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
#============================================================