diff --git a/install-driver.sh b/install-driver.sh index 93c70c8..25966df 100755 --- a/install-driver.sh +++ b/install-driver.sh @@ -28,8 +28,8 @@ SCRIPT_VERSION="20230126" MODULE_NAME="88x2bu" DRV_VERSION="5.13.1" -KVER="$(uname -r)" KARCH="$(uname -m)" +KVER="$(uname -r)" MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/" DRV_NAME="rtl${MODULE_NAME}" @@ -74,6 +74,14 @@ if ! command -v gcc >/dev/null 2>&1; then exit 1 fi +# check to ensure bc is installed +if ! command -v bc >/dev/null 2>&1; then + echo "A required package is not installed." + echo "Please install the following package: bc" + echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\"" + exit 1 +fi + # check to ensure make is installed if ! command -v make >/dev/null 2>&1; then echo "A required package is not installed." diff --git a/remove-driver.sh b/remove-driver.sh index 7b45d08..ecd7182 100755 --- a/remove-driver.sh +++ b/remove-driver.sh @@ -28,8 +28,8 @@ SCRIPT_VERSION="20230126" MODULE_NAME="88x2bu" DRV_VERSION="5.13.1" -KVER="$(uname -r)" KARCH="$(uname -m)" +KVER="$(uname -r)" MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/" DRV_NAME="rtl${MODULE_NAME}" @@ -67,10 +67,10 @@ echo ": ${SCRIPT_NAME} v${SCRIPT_VERSION}" # information that helps with bug reports # display architecture -echo ": ${KARCH} (ARCH)" +echo ": ${KARCH} (architecture)" # display kernel version -echo ": ${KVER}" +echo ": ${KVER} (kernel version)" echo ": ---------------------------" @@ -132,9 +132,8 @@ echo "You may now delete the driver directory if desired." # if NoPrompt is not used, ask user some questions if [ $NO_PROMPT -ne 1 ]; then - printf "Do you want to apply the new options by rebooting now? (recommended) [y/N] " + printf "Do you want to reboot now? (recommended) [y/N] " read -r REPLY - echo case "$REPLY" in [yY]*) reboot ;; esac