1
0
mirror of https://github.com/morrownr/8821cu-20210916.git synced 2024-11-01 01:05:25 +00:00

continued improvements to the scripts

This commit is contained in:
morrownr 2022-11-28 12:27:45 -06:00
parent 2b88b2bb12
commit 34c3bda2c5
2 changed files with 30 additions and 27 deletions

View File

@ -104,6 +104,7 @@ then
if [[ "$RESULT" = "0" ]] if [[ "$RESULT" = "0" ]]
then then
make clean >/dev/null 2>&1
echo "The driver was installed successfully." echo "The driver was installed successfully."
else else
echo "An error occurred. Error = ${RESULT}" echo "An error occurred. Error = ${RESULT}"

View File

@ -67,6 +67,9 @@ echo "Linux Kernel=${KVER}"
echo "CPU Architecture=${KARCH}" echo "CPU Architecture=${KARCH}"
#getconf LONG_BIT (may be handy in the future) #getconf LONG_BIT (may be handy in the future)
# determine if dkms is installed and run the appropriate routines
if command -v dkms >/dev/null 2>&1
then
# 2>/dev/null suppresses the output of dkms # 2>/dev/null suppresses the output of dkms
dkms remove -m ${DRV_NAME} -v ${DRV_VERSION} --all 2>/dev/null dkms remove -m ${DRV_NAME} -v ${DRV_VERSION} --all 2>/dev/null
RESULT=$? RESULT=$?
@ -80,24 +83,23 @@ then
if [[ ("$RESULT" = "0") ]] if [[ ("$RESULT" = "0") ]]
then then
echo "${DRV_NAME}/${DRV_VERSION} has been removed" echo "${DRV_NAME}/${DRV_VERSION} has been removed"
echo "If older versions of ${DRV_NAME} are installed, run:"
echo "$ sudo dkms remove ${DRV_NAME}/<version> --all"
echo "dkms shows the following drivers are still installed:"
dkms status
fi fi
else
echo "An error occurred. dkms remove error = ${RESULT}"
echo "Please report this error."
exit $RESULT
fi
fi
echo "Removing ${BLACKLIST_FILE} from /etc/modprobe.d" echo "Removing ${BLACKLIST_FILE} from /etc/modprobe.d"
rm -f /etc/modprobe.d/${BLACKLIST_FILE} rm -f /etc/modprobe.d/${BLACKLIST_FILE}
echo "Removing ${OPTIONS_FILE} from /etc/modprobe.d" echo "Removing ${OPTIONS_FILE} from /etc/modprobe.d"
rm -f /etc/modprobe.d/${OPTIONS_FILE} rm -f /etc/modprobe.d/${OPTIONS_FILE}
echo "Removing source files from /usr/src/${DRV_NAME}-${DRV_VERSION}" echo "Removing 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}
make clean >/dev/null 2>&1
echo "The driver was removed successfully." echo "The driver was removed successfully."
echo "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."
exit $RESULT
fi
# if NoPrompt is not used, ask user some questions to complete removal # if NoPrompt is not used, ask user some questions to complete removal
if [ $NO_PROMPT -ne 1 ] if [ $NO_PROMPT -ne 1 ]