reload kernel module from initscript during package update

Chow Loong Jin hyperair at ubuntu.com
Fri Jul 1 15:43:16 UTC 2011


On 01/07/2011 22:26, Mario Limonciello wrote:
> On Fri, Jul 1, 2011 at 09:23, Christoph Mathys <eraserix at gmail.com
> <mailto:eraserix at gmail.com>> wrote:
> 
>     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
> 
>     --
>     Ubuntu-motu mailing list
>     Ubuntu-motu at lists.ubuntu.com <mailto:Ubuntu-motu at lists.ubuntu.com>
>     Modify settings or unsubscribe at:
>     https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu
> 
> 
> Why not set up the module to load on demand from a modalias instead?

I think the issue is less to do with the initscript and more to do with
reloading the module -- after the upgrade, the postinst doesn't manage to reload
the module because something is holding onto the device node.

-- 
Kind regards,
Loong Jin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-motu/attachments/20110701/d9615a9f/attachment.pgp>


More information about the Ubuntu-motu mailing list