[linux-dvb] Improved rmmod.pl script

Klaus Schmidinger Klaus.Schmidinger at cadsoft.de
Tue Oct 3 18:31:33 CEST 2006


The rmmod.pl script that comes with the current driver source
blindly tries to load all modules it can find. While this is
good in case one has no idea which modules to load, there's
no easy way of finding out exactly which modules need to be loaded
to support just the installed hardware (unless I've missed it).

The attached version of this script accepts additional
parameters, which can be used to specify the "top level"
driver modules to load, and starting from there it loads
all other modules that the given ones depend on.

For a system with full featured and budget DVB cards, the call
might look like this:

   rmmod.pl load dvb-ttpci budget

The modified script also makes sure that the explicitly
mentioned modules are loaded in the given sequence, so
that the sequence of devices can be defined (for instance
making sure that the first device is a full featured card).

This also works with 'reload', as in

   rmmod.pl reload dvb-ttpci budget

So this could be the only line necessary in a 'runvdr'
script, because it first unloads all given modules and
the ones they depend on (if any are loaded) and then loads
the given ones plus the ones they depend on.

Without the additional parameters the behavior is as before.

Maybe this is also useful to others. If so, perhaps it could
be checked in to the Mercurial by somebody with write access.

Klaus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rmmod.pl
Type: application/x-perl
Size: 4660 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20061003/fcd4283e/rmmod.bin


More information about the linux-dvb mailing list