From ede68a61920c3fdae63e4fa2e347a601f7264bb6 Mon Sep 17 00:00:00 2001 From: morrownr Date: Sun, 18 Dec 2022 01:05:54 -0600 Subject: [PATCH] detect previously dkms installed driver --- core/rtw_debug.c | 3 ++- install-driver.sh | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/rtw_debug.c b/core/rtw_debug.c index e44bea9..029d97c 100644 --- a/core/rtw_debug.c +++ b/core/rtw_debug.c @@ -42,7 +42,8 @@ const char *rtw_log_level_str[] = { void dump_drv_version(void *sel) { RTW_PRINT_SEL(sel, "%s %s\n", DRV_NAME, DRIVERVERSION); - RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__); +/* nrm */ +// RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__); } #ifdef CONFIG_PROC_DEBUG diff --git a/install-driver.sh b/install-driver.sh index a16a7f9..e7cda30 100755 --- a/install-driver.sh +++ b/install-driver.sh @@ -125,11 +125,14 @@ then /sbin/depmod -a ${KVER} fi -# check for installed dkms installations (work in progress) +# check for existing dkms installations of any version of this driver if command -v dkms >/dev/null 2>&1 then - if dkms status | grep -qw ${DRV_NAME}; then - echo "opps..." + if dkms status | grep -i ${DRV_NAME}; then + echo "The above driver needs to be removed before the installation can be successfull." + echo "Example: $ sudo dkms remove ${DRV_NAME}/X.X.X.X --all" + echo "Please replace X.X.X.X by the driver version number shown above." + echo "Once the driver is removed, please run \"sudo ./${SCRIPT_NAME}\"" exit 1 fi fi