mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
45 lines
808 B
Text
45 lines
808 B
Text
post_install (){
|
|
|
|
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 $*
|