New Script: rtlwifi-setup.sh: install wifi dongle drivers
This commit is contained in:
parent
b62f0a9809
commit
a6e85b5d5f
45
rtlwifi-setup.sh
Executable file
45
rtlwifi-setup.sh
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
pkgname="master"
|
||||||
|
pkgurl="https://github.com/cilynx/rtl88x2BU_WiFi_linux_v5.3.1_27678.20180430_COEX20180427-5959/archive/${pkgname}.zip"
|
||||||
|
installcmd="dnf install"
|
||||||
|
installcmdextra="dnf group install"
|
||||||
|
pkgdeps="wget unzip dnsmasq hostapd bc dkms kernel-headers rsync"
|
||||||
|
pkgdepsextra='"Development Tools"'
|
||||||
|
tmpdir="/tmp"
|
||||||
|
|
||||||
|
_fetch_deps(){
|
||||||
|
${installcmd} ${pkgdeps}
|
||||||
|
${installcmdextra} ${pkgdepsextra}
|
||||||
|
}
|
||||||
|
|
||||||
|
_download(){
|
||||||
|
if [ ! -f ${tmpdir}/${pkgname}.zip ];then
|
||||||
|
wget ${pkgurl} -P ${tmpdir}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_extract(){
|
||||||
|
if [ -f $(which unzip) ];then
|
||||||
|
cd ${tmpdir}
|
||||||
|
unzip ${pkgname}.zip
|
||||||
|
else
|
||||||
|
echo "Install unzip"
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
_install(){
|
||||||
|
cd ${tmpdir}/rtl88x2BU_WiFi_linux_v5.3.1_27678.20180430_COEX20180427-5959-master
|
||||||
|
VER=$(sed -n 's/\PACKAGE_VERSION="\(.*\)"/\1/p' dkms.conf)
|
||||||
|
rsync -rvhP ./ /usr/src/rtl88x2bu-${VER}
|
||||||
|
dkms add -m rtl88x2bu -v ${VER}
|
||||||
|
dkms build -m rtl88x2bu -v ${VER}
|
||||||
|
dkms install -m rtl88x2bu -v ${VER}
|
||||||
|
}
|
||||||
|
|
||||||
|
_fetch_deps
|
||||||
|
_download
|
||||||
|
_extract
|
||||||
|
_install
|
Loading…
x
Reference in New Issue
Block a user