minor updates

This commit is contained in:
morrownr 2021-12-14 07:09:23 -06:00
parent f9f62acd06
commit 222234df83
3 changed files with 50 additions and 33 deletions

View File

@ -13,7 +13,7 @@
#### 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)
- 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)
@ -156,7 +156,7 @@ a good idea as to whether you need to remove a previously installed
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.

View File

@ -1,7 +1,7 @@
#!/bin/bash
SCRIPT_NAME="install-driver.sh"
SCRIPT_VERSION="20211204"
SCRIPT_VERSION="20211212"
DRV_NAME="rtl88x2bu"
DRV_VERSION="5.13.1"
@ -10,12 +10,13 @@ OPTIONS_FILE="88x2bu.conf"
DRV_DIR="$(pwd)"
KRNL_VERSION="$(uname -r)"
NO_PROMPT=0
clear
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 ]
do
case $1 in
@ -43,7 +44,7 @@ fi
if [[ -d "/usr/src/${DRV_NAME}-${DRV_VERSION}" ]]
then
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"
exit 1
fi
@ -62,6 +63,8 @@ if [[ "$RESULT" != "0" ]]
then
echo "An error occurred. dkms add error = ${RESULT}"
echo "Please report this error."
echo "You will need to run the following before reattempting installation."
echo "$ sudo ./remove-driver.sh"
exit $RESULT
fi
@ -72,6 +75,8 @@ if [[ "$RESULT" != "0" ]]
then
echo "An error occurred. dkms build error = ${RESULT}"
echo "Please report this error."
echo "You will need to run the following before reattempting installation."
echo "$ sudo ./remove-driver.sh"
exit $RESULT
fi
@ -82,24 +87,28 @@ if [[ "$RESULT" != "0" ]]
then
echo "An error occurred. dkms install error = ${RESULT}"
echo "Please report this error."
echo "You will need to run the following before reattempting installation."
echo "$ sudo ./remove-driver.sh"
exit $RESULT
fi
echo "The driver was installed successfully."
# unblock wifi
rfkill unblock wlan
# if NoPrompt is not used, ask user some questions to complete installation
if [ $NO_PROMPT -ne 1 ]
then
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]$ ]]
then
nano /etc/modprobe.d/${OPTIONS_FILE}
fi
read -p "Do you want to reboot now? [y/N] " -n 1 -r
echo # move to a new line
read -p "Do you want to reboot now? (recommended) [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
reboot

View File

@ -1,34 +1,42 @@
#!/bin/bash
SCRIPT_NAME="remove-driver.sh"
SCRIPT_VERSION="20211204"
SCRIPT_VERSION="20211212"
DRV_NAME="rtl88x2bu"
DRV_VERSION="5.13.1"
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
# Get the options
# get the options
while [ $# -gt 0 ]
do
case $1 in
NoPrompt)
NO_PROMPT=1 ;;
*h|*help|*)
echo "Syntax $0 <NoPrompt>"
echo " NoPrompt - noninteractive mode"
echo " -h|--help - Show help"
exit 1
;;
esac
shift
case $1 in
NoPrompt)
NO_PROMPT=1 ;;
*h|*help|*)
echo "Syntax $0 <NoPrompt>"
echo " NoPrompt - noninteractive mode"
echo " -h|--help - Show help"
exit 1
;;
esac
shift
done
# check to ensure sudo was used
if [[ $EUID -ne 0 ]]
then
echo "You must run this script with superuser (root) privileges."
echo "Try \"sudo ./${SCRIPT_NAME}\""
echo "Try: \"sudo ./${SCRIPT_NAME}\""
exit 1
fi
@ -47,7 +55,7 @@ then
echo "Deleting source files from /usr/src/${DRV_NAME}-${DRV_VERSION}"
rm -rf /usr/src/${DRV_NAME}-${DRV_VERSION}
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
echo "An error occurred. dkms remove error = ${RESULT}"
echo "Please report this error."
@ -55,13 +63,13 @@ else
fi
if [ $NO_PROMPT -ne 1 ]
then
read -p "Are you ready to reboot now? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
reboot
fi
then
read -p "Do you want to reboot now? (recommended) [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
reboot
fi
fi
exit 0