mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
49 lines
964 B
Text
49 lines
964 B
Text
post_install (){
|
|
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"
|
|
|
|
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 $*
|