[PATCH] "dkms status" command bug report

Matt Domsch Matt_Domsch at dell.com
Sat Apr 19 08:46:59 CDT 2008


I'm forwarding bug/patch sent to me privately.  I'd do it a little
differently (just put the | awk in the same command), but as I haven't
looked at the output of find_module_from_ko closely recently, want to
be sure this always prints the right thing before applying.
-Matt

----- Forwarded message from "Chen, Anthony"  -----

Subject: "dkms status" command  bug report
Date: Fri, 18 Apr 2008 19:26:52 -0400
Thread-Topic: "dkms status" command  bug report
From: "Chen, Anthony"

Matt,

I'd like to report a bug in the "dkms status" reporting "install-weak"
modules.

Here's the diff:

SMP006-9:~ # diff -u dkms dkms.new 
--- dkms        2008-04-18 12:10:14.000000000 -0400
+++ dkms.new    2008-04-18 12:09:58.000000000 -0400
@@ -1805,7 +1805,8 @@
            # is $installed_ko in /var/lib/dkms as installed?  Find
which module has it
            for f in $(find $dkms_tree/$r_mod -maxdepth $depth -mindepth
$depth -name kernel-\* -type l 2>/dev/null); do
                if [ -z "$r_mod" ]; then
-                   mod=$(find_module_from_ko "$depth" "$basename_ko")
+                   mods=$(find_module_from_ko "$depth" "$basename_ko")
+                   mod=`echo $mods | awk '{ print $1 }'`
                else
                    mod="$r_mod"
                fi


If the system has three kernels and one kernel is incompatible with the
other two kernels, find_module_from_ko will return the same module more
than once which will cause the following diff command to fail and the
result is the installed-weak modules are not reported.

Thanks,
Anthony

----- End forwarded message -----

-- 
Matt Domsch
Linux Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux



More information about the DKMS-devel mailing list