From 02988962dd988d494f57f487d5a5c25fa973921c Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Wed, 3 Jul 2024 12:06:55 +0200 Subject: [PATCH 1/3] fix dkms status invocation and do not query unrelated modules --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 66ced00..86f9488 100755 --- a/configure +++ b/configure @@ -614,7 +614,7 @@ dkms_check() { echo Yes. DKMSINSTALL=dinstall test "$FROMDKMSCONF" && return - if dkms status | grep ^ipt-netflow, >/dev/null; then + if dkms status ipt-netflow | grep ^ipt-netflow/ >/dev/null; then echo "! You are already have module installed via DKMS" echo "! it will be uninstalled on 'make install' and" echo "! current version of module installed afterwards." From bef078bdf57f0792ed786f50ca00da48954baec9 Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Wed, 3 Jul 2024 12:09:45 +0200 Subject: [PATCH 2/3] do not check for dkms if called from dkms --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index 86f9488..dba4053 100755 --- a/configure +++ b/configure @@ -3,6 +3,7 @@ PATH=$PATH:/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/sbin +KDKMS= case "$1" in --from-dkms-conf*) KDKMS=`echo "$1" | sed 's/[^=]*.//'` @@ -589,6 +590,7 @@ snmp_check() { dkms_check() { DKMSINSTALL= + test "$KDKMS" && return test "$SKIPDKMS" && return echo -n "Checking for DKMS... " From d53581db222235f33ce60370743fc421267da691 Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Wed, 3 Jul 2024 12:12:31 +0200 Subject: [PATCH 3/3] set KDIR early if called from dkms and get version from sources --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index dba4053..9254af4 100755 --- a/configure +++ b/configure @@ -7,6 +7,7 @@ KDKMS= case "$1" in --from-dkms-conf*) KDKMS=`echo "$1" | sed 's/[^=]*.//'` + KDIR="$KDKMS" # restore options from existing Makefile, if present if [ -e Makefile ]; then set -- `sed -n 's/^CARGS = \(.*\)/\1/p' Makefile`