On Tue, Nov 24, 2009 at 11:44:16AM -0000, Giuseppe Iuculano wrote:
> This doesn't work.

What didn't work?  Comparing the diffs, I see a bug in mine that I used the
'filename' variable twice when the first instance should have been
'module_in_tree'; but your version instead introduces new variables
(PACKAGE_NAME?) that aren't defined anywhere in the script.  I guess this
comes from the source/dkms.conf; should this value always be the same as the
directory name, or is there ever a reason to prefer one or the other?

-                       version_in_tree="$filename"
+                       version_in_tree="$(basename $filename)"

This adds an extra fork for each directory.  Can be done in shell instead
as:

  version_in_tree=${filename##*/}
  module_in_tree=${filename%/*}
  module_in_tree=${module_in_tree##*/}

Also, the double for loop is needed because we care about counting how many
versions are available for the same module; with your changes, we lose that
information.

Updated patch attached.


** Attachment added: "dkms-initscript-optimizations.diff"
   http://launchpadlibrarian.net/36552989/dkms-initscript-optimizations.diff

-- 
optimize the dkms init script to be less greedy at boot time
https://bugs.launchpad.net/bugs/484386
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to