reload kernel module from initscript during package update

Christoph Mathys eraserix at gmail.com
Fri Jul 1 14:23:22 UTC 2011


I've got a package which contains a kernel module (packaged with
dkms). This kernel module is loaded by an init-script, which is also
part of the package. Now the problem is this: If an application is
running and using the device, the init script fails when it tries to
reload the updated module, which right now causes the package
installation to fail.

Now the question is: Are there any best practices to handle this sort of thing?

I thinking of implementing one of the following ideas:
I could ask the user with a debconf dialog if he wants to terminate
the application[s] holding the device node open, warning that an old
module version is used if the applications are not terminated.

I could also just leave the module loaded and give a hint, that the
modules initscript needs to be called with restart.

Christoph



More information about the Ubuntu-motu mailing list