Merge pull request #99 from leewc/main

Use make uninstall when dkms not present on remove-driver.sh
This commit is contained in:
Nick 2022-12-04 15:28:33 -06:00 committed by GitHub
commit 3f55614840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,12 @@ done
echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}" echo "Running ${SCRIPT_NAME} version ${SCRIPT_VERSION}"
echo "Starting removal..." echo "Starting removal..."
if ! command -v dkms >/dev/null 2>&1
then
make uninstall
else
dkms remove -m ${DRV_NAME} -v ${DRV_VERSION} --all dkms remove -m ${DRV_NAME} -v ${DRV_VERSION} --all
fi
RESULT=$? RESULT=$?
# RESULT will be 3 if there are no instances of module to remove # RESULT will be 3 if there are no instances of module to remove