1
0
mirror of https://github.com/morrownr/8821cu-20210916.git synced 2024-11-03 02:03:38 +00:00

detect previously dkms installed driver

This commit is contained in:
morrownr 2022-12-18 01:05:54 -06:00
parent b197dee08a
commit ede68a6192
2 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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