Bug 238383 - dkms should rerun start_udev if new modules are built
dkms should rerun start_udev if new modules are built
Product: Fedora
Classification: Fedora
Component: dkms (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Matt Domsch
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-04-29 21:33 EDT by Jon Nettleton
Modified: 2007-11-30 17:12 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-28 23:38:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jon Nettleton 2007-04-29 21:33:43 EDT
Description of problem:
start_udev is run before dkms_autoinstaller during the boot process.  By
re-running start_udev if new modules are installed, the supported hardware will
be re-detected and the proper modules loaded.  This is very important for
hotplug devices with out of kernel drivers.

I would attach a patch, but this is pretty basic behaviour.
Comment 1 Matt Domsch 2007-09-19 23:08:05 EDT
I'm sorry, this had escaped me for so long.  Adding Harald for his perspective
on calling start_udev, as it's not something I've looked into before.

Harald, if new modules are built and installed into the /lib/modules tree, and
depmod is run, does udev need to know of this?
Comment 2 Matt Domsch 2007-09-19 23:09:34 EDT
Adding Kay for his perspective as well.
Comment 3 Kay Sievers 2007-09-20 02:32:08 EDT
It's probably enough to run:
or even:
  udevtrigger --subsystem-match=<bus> --subsystem-match=<bus>
if you know the buses you installed drivers for.
Comment 4 Harald Hoyer 2007-09-20 05:27:41 EDT
Kay was faster :)
Comment 5 Jon Nettleton 2007-09-20 07:54:11 EDT
That all sounds good.  I am also working on adding dkms support to the
new-kernel-pkg script.  This will allow dkms kernel modules to be built and
removed directly from kernel rpm scripts.  This should allow for better
notification if a dkms module fails to build and can allow us to "fallback" to
the last fully working kernel until the problem is fixed.
Comment 6 Matt Domsch 2007-09-20 10:08:55 EDT
Here's what I'm proposing to put into DKMS to address this.  This goes at the
end of 'dkms install'.  How's this look?  Without parsing the module for
modinfo, I don't know the bus.  Should I do something like:

modinfo aic7xxx.ko | grep ^alias | awk '{print $2}' | awk -F: '{print $1}'

to get each of the busses and pass that?

diff --git a/dkms b/dkms
index 13dbc54..98ce503 100755
--- a/dkms
+++ b/dkms
@@ -1247,6 +1247,11 @@ function install_module()
+    # Notify udev if we installed something for the currently running kernel
+    if [ -x /sbin/udevtrigger -a "${kernelver_array[0]}" == "$(uname -r)" -a
"${arch_array[0]}" == "$(uname -m)" ]; then
+       /sbin/udevtrigger
+    fi
     echo $""
     echo $"DKMS: install Completed."
Comment 7 Matt Domsch 2007-10-28 23:38:17 EDT is released with the above patch.  Closing.

Note You need to log in before you can comment on or make changes to this bug.