Does the is_loaded function cause you any problems? I think it is better to check if the module is already loaded, because
this avoids duplicate messages from discover-modprobe. I remember bug
complaints about duplicate module loading in the past.
I'm running kernel 2.6.x, so I cannot say whether the "old" modprobe of the modutils package complains about duplicate attempts to load a module. The "new" modprobe doesn't say a word. It ignores duplicate modules.
Calling "cut", "grep", and either "true" or "false" is a _lot_ of overhead for testing a module. Not to mention the workarounds necessary for kernel 2.6.x.
Modprobe is much more efficient in this test. It knows how to handle '-' and '_' in the module names. And since /etc/init.d/discover is usually run at boot time when there are no modules loaded yet, there is a pretty high chance that discover-modprobe has to call modprobe, anyway.
My suggestion would be to use discover to generate a list of possible modules and maybe their params, and then to rely upon modprobe to load these modules, if necessary. This would make discover-modprobe more independent.
Regards
Harri
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]