PKGBUILDs/alarm/dkms-8188eu/dkms-8188eu.install

50 lines
964 B
Plaintext
Raw Normal View History

2013-06-03 05:54:10 +00:00
post_install (){
2014-03-02 12:48:03 +00:00
echo ""
echo "If your kernel is >= 3.12 and comes with"
echo "rtlwifi driver you will have to blacklist"
echo "rtlwifi for this driver to work"
2013-06-03 05:54:10 +00:00
MODULE="8188eu"
DKMS=$(which dkms)
MODPROBE=$(which modprobe)
VERSION="v4.1.4_6773"
$DKMS add -m $MODULE -v $VERSION
$DKMS build -m $MODULE -v $VERSION
$DKMS install -m $MODULE -v $VERSION
$MODPROBE -a $MODULE
}
pre_upgrade(){
pre_remove
}
post_upgrade(){
post_install
}
pre_remove (){
_inmemory=$(/usr/bin/lsmod | /usr/bin/grep 8188eu)
if [ ! -z "$_inmemory" ]; then
/usr/bin/rmmod 8188eu &> /dev/null
fi
DKMS=$(which dkms)
_line=$($DKMS status -m 8188eu)
if echo "$_line" | grep -E 'added|built|installed'; then
version=$(echo "$_line" | sed 's/8188eu,\([^,]*\)[,:].*/\1/;t;d')
$DKMS remove -m 8188eu -v $version --all
fi
}
post_remove () {
/sbin/depmod -a
}
op=$1
shift
$op $*