minor updates
This commit is contained in:
parent
f9f62acd06
commit
222234df83
@ -13,7 +13,7 @@
|
|||||||
#### Problem reports should include the information obtained with the following command:
|
#### Problem reports should include the information obtained with the following command:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo uname -a && mokutil --sb-state && lsusb && rfkill list all && dkms status && iw dev
|
$ sudo uname -a; mokutil --sb-state; lsusb; rfkill list all; dkms status; iw dev
|
||||||
```
|
```
|
||||||
|
|
||||||
-----
|
-----
|
||||||
@ -96,7 +96,7 @@ the Installation Steps can be improved.
|
|||||||
|
|
||||||
- openSUSE Tumbleweed (rolling) (kernel 5.15)
|
- openSUSE Tumbleweed (rolling) (kernel 5.15)
|
||||||
|
|
||||||
- Raspberry Pi OS (2021-10-30 (ARM 32 bit) (kernel 5.10)
|
- Raspberry Pi OS (2021-10-30) (ARM 32 bit) (kernel 5.10)
|
||||||
|
|
||||||
- Raspberry Pi Desktop (x86 32 bit) (kernel 4.19)
|
- Raspberry Pi Desktop (x86 32 bit) (kernel 4.19)
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ a good idea as to whether you need to remove a previously installed
|
|||||||
driver by running the following:
|
driver by running the following:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo dkms status
|
dkms status
|
||||||
```
|
```
|
||||||
|
|
||||||
The installation instructions are for the novice user. Experienced users are welcome to alter the installation to meet their needs.
|
The installation instructions are for the novice user. Experienced users are welcome to alter the installation to meet their needs.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
SCRIPT_NAME="install-driver.sh"
|
SCRIPT_NAME="install-driver.sh"
|
||||||
SCRIPT_VERSION="20211204"
|
SCRIPT_VERSION="20211212"
|
||||||
|
|
||||||
DRV_NAME="rtl88x2bu"
|
DRV_NAME="rtl88x2bu"
|
||||||
DRV_VERSION="5.13.1"
|
DRV_VERSION="5.13.1"
|
||||||
@ -10,12 +10,13 @@ OPTIONS_FILE="88x2bu.conf"
|
|||||||
DRV_DIR="$(pwd)"
|
DRV_DIR="$(pwd)"
|
||||||
KRNL_VERSION="$(uname -r)"
|
KRNL_VERSION="$(uname -r)"
|
||||||
|
|
||||||
NO_PROMPT=0
|
|
||||||
|
|
||||||
clear
|
clear
|
||||||
echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}"
|
echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}"
|
||||||
|
|
||||||
# Get the options
|
# support for NoPrompt allows non-interactive use of this script
|
||||||
|
NO_PROMPT=0
|
||||||
|
|
||||||
|
# get the options
|
||||||
while [ $# -gt 0 ]
|
while [ $# -gt 0 ]
|
||||||
do
|
do
|
||||||
case $1 in
|
case $1 in
|
||||||
@ -43,7 +44,7 @@ fi
|
|||||||
if [[ -d "/usr/src/${DRV_NAME}-${DRV_VERSION}" ]]
|
if [[ -d "/usr/src/${DRV_NAME}-${DRV_VERSION}" ]]
|
||||||
then
|
then
|
||||||
echo "It appears that this driver may already be installed."
|
echo "It appears that this driver may already be installed."
|
||||||
echo "You will need to run the following before installing."
|
echo "You will need to run the following before reattempting installation."
|
||||||
echo "$ sudo ./remove-driver.sh"
|
echo "$ sudo ./remove-driver.sh"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -62,6 +63,8 @@ if [[ "$RESULT" != "0" ]]
|
|||||||
then
|
then
|
||||||
echo "An error occurred. dkms add error = ${RESULT}"
|
echo "An error occurred. dkms add error = ${RESULT}"
|
||||||
echo "Please report this error."
|
echo "Please report this error."
|
||||||
|
echo "You will need to run the following before reattempting installation."
|
||||||
|
echo "$ sudo ./remove-driver.sh"
|
||||||
exit $RESULT
|
exit $RESULT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -72,6 +75,8 @@ if [[ "$RESULT" != "0" ]]
|
|||||||
then
|
then
|
||||||
echo "An error occurred. dkms build error = ${RESULT}"
|
echo "An error occurred. dkms build error = ${RESULT}"
|
||||||
echo "Please report this error."
|
echo "Please report this error."
|
||||||
|
echo "You will need to run the following before reattempting installation."
|
||||||
|
echo "$ sudo ./remove-driver.sh"
|
||||||
exit $RESULT
|
exit $RESULT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -82,24 +87,28 @@ if [[ "$RESULT" != "0" ]]
|
|||||||
then
|
then
|
||||||
echo "An error occurred. dkms install error = ${RESULT}"
|
echo "An error occurred. dkms install error = ${RESULT}"
|
||||||
echo "Please report this error."
|
echo "Please report this error."
|
||||||
|
echo "You will need to run the following before reattempting installation."
|
||||||
|
echo "$ sudo ./remove-driver.sh"
|
||||||
exit $RESULT
|
exit $RESULT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "The driver was installed successfully."
|
echo "The driver was installed successfully."
|
||||||
|
|
||||||
|
# unblock wifi
|
||||||
rfkill unblock wlan
|
rfkill unblock wlan
|
||||||
|
|
||||||
|
# if NoPrompt is not used, ask user some questions to complete installation
|
||||||
if [ $NO_PROMPT -ne 1 ]
|
if [ $NO_PROMPT -ne 1 ]
|
||||||
then
|
then
|
||||||
read -p "Do you want to edit the driver options file now? [y/N] " -n 1 -r
|
read -p "Do you want to edit the driver options file now? [y/N] " -n 1 -r
|
||||||
echo # move to a new line
|
echo
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
then
|
then
|
||||||
nano /etc/modprobe.d/${OPTIONS_FILE}
|
nano /etc/modprobe.d/${OPTIONS_FILE}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -p "Do you want to reboot now? [y/N] " -n 1 -r
|
read -p "Do you want to reboot now? (recommended) [y/N] " -n 1 -r
|
||||||
echo # move to a new line
|
echo
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
then
|
then
|
||||||
reboot
|
reboot
|
||||||
|
@ -1,34 +1,42 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
SCRIPT_NAME="remove-driver.sh"
|
SCRIPT_NAME="remove-driver.sh"
|
||||||
SCRIPT_VERSION="20211204"
|
SCRIPT_VERSION="20211212"
|
||||||
|
|
||||||
DRV_NAME="rtl88x2bu"
|
DRV_NAME="rtl88x2bu"
|
||||||
DRV_VERSION="5.13.1"
|
DRV_VERSION="5.13.1"
|
||||||
OPTIONS_FILE="88x2bu.conf"
|
OPTIONS_FILE="88x2bu.conf"
|
||||||
|
|
||||||
|
DRV_DIR="$(pwd)"
|
||||||
|
KRNL_VERSION="$(uname -r)"
|
||||||
|
|
||||||
|
clear
|
||||||
|
echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}"
|
||||||
|
|
||||||
|
# support for NoPrompt allows non-interactive use of this script
|
||||||
NO_PROMPT=0
|
NO_PROMPT=0
|
||||||
|
|
||||||
# Get the options
|
# get the options
|
||||||
while [ $# -gt 0 ]
|
while [ $# -gt 0 ]
|
||||||
do
|
do
|
||||||
case $1 in
|
case $1 in
|
||||||
NoPrompt)
|
NoPrompt)
|
||||||
NO_PROMPT=1 ;;
|
NO_PROMPT=1 ;;
|
||||||
*h|*help|*)
|
*h|*help|*)
|
||||||
echo "Syntax $0 <NoPrompt>"
|
echo "Syntax $0 <NoPrompt>"
|
||||||
echo " NoPrompt - noninteractive mode"
|
echo " NoPrompt - noninteractive mode"
|
||||||
echo " -h|--help - Show help"
|
echo " -h|--help - Show help"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# check to ensure sudo was used
|
||||||
if [[ $EUID -ne 0 ]]
|
if [[ $EUID -ne 0 ]]
|
||||||
then
|
then
|
||||||
echo "You must run this script with superuser (root) privileges."
|
echo "You must run this script with superuser (root) privileges."
|
||||||
echo "Try \"sudo ./${SCRIPT_NAME}\""
|
echo "Try: \"sudo ./${SCRIPT_NAME}\""
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -47,7 +55,7 @@ then
|
|||||||
echo "Deleting source files from /usr/src/${DRV_NAME}-${DRV_VERSION}"
|
echo "Deleting source files from /usr/src/${DRV_NAME}-${DRV_VERSION}"
|
||||||
rm -rf /usr/src/${DRV_NAME}-${DRV_VERSION}
|
rm -rf /usr/src/${DRV_NAME}-${DRV_VERSION}
|
||||||
echo "The driver was removed successfully."
|
echo "The driver was removed successfully."
|
||||||
echo "Info: You may now delete the driver directory if desired."
|
echo "You may now delete the driver directory if desired."
|
||||||
else
|
else
|
||||||
echo "An error occurred. dkms remove error = ${RESULT}"
|
echo "An error occurred. dkms remove error = ${RESULT}"
|
||||||
echo "Please report this error."
|
echo "Please report this error."
|
||||||
@ -55,13 +63,13 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $NO_PROMPT -ne 1 ]
|
if [ $NO_PROMPT -ne 1 ]
|
||||||
then
|
then
|
||||||
read -p "Are you ready to reboot now? [y/N] " -n 1 -r
|
read -p "Do you want to reboot now? (recommended) [y/N] " -n 1 -r
|
||||||
echo
|
echo
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
then
|
then
|
||||||
reboot
|
reboot
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user