[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#283525: marked as done (Discover-modprobe could skip loading of modules it already tried to load)



Your message dated Fri, 11 Aug 2006 15:41:38 +0200
with message-id <E1GBXGc-000705-1q@diskless.uio.no>
and subject line Discover-modprobe could skip loading of modules it already tried to load
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: discover
Version: 2.0.6-1
Priority: wishlist
Tags: patch

The discover-modprobe will try to load modules twice under some
circunstances. The following patch uses a 'loadfile' to determine which
modules have been loaded and skips those. I think this was suggested in 
some bug reports, and I included it in my proposed NMU so I'm just 
recording it in case it's useful.

loadfile should be defined in the header too (not done in the patch below). 
I used this:

 conf="${sysconfdir}/discover-modprobe.conf"
 crashdir="${localstatedir}/lib/discover"
 crashfile="${crashdir}/crash"
+loadfile="${crashdir}/load"

The patch is as show below:

@@ -112,9 +113,14 @@
 fi

 # Load the modules.
+touch "${loadfile}"
 for module_info in ${module_details}; do
-    module_name=$(echo ${module_info} | sed 's/^\([^ ]\+\).*/\1/')
-    if [ ${module_name} = "ignore" -o ${module_name} = "unknown" ]; then
+    module_name=$(echo ${module_info} | sed -e '\([^ ]\+\).*/\1/')
+    # Skip modules that have already been analysed
+    [ -n "`grep \"^${module_name}$\" ${loadfile}`" ] && continue
+    echo ${module_name} >> "${loadfile}"
+
+    if [ "${module_name}" = "ignore" ] || [ "${module_name}" = "unknown" 
]; then
         continue
     fi

@@ -149,5 +155,6 @@
     rm -f "${crashfile}"
     sync
 done
+rm -f "${loadfile}"

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Version: 2.0.6-2

This problem was fixed when the call to /usr/bin/uniq was rewritten to
use some shell code instead.  This was the changelog of that upload:

discover (2.0.6-2) unstable; urgency=low

  * Change the default setting for "types" in discover-modprobe.conf
    to "all" (from "").  Closes: #282983.
  * Replace uniq in discover-modprobe with some clever shell, since
    uniq is also in /usr/bin.  Closes: #247423.

 -- Jeff Licquia <licquia@progeny.com>  Mon, 29 Nov 2004 23:06:17 -0500

--- End Message ---

Reply to: