Skip to contentSkip to conversation

Forward: Bug#145484: usb.agent(load_drivers): 'missing kernel or user mode driver <...>'

PATCH Fumitoshi UKAI 2 participants 2 messages May 2, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

I received the attached report. I think this patch seems to be ok. May I apply this patch to cvs repository?

Regards,
Fumitoshi UKAI

Package: hotplug
Version: 0.0.20020114-7
Severity: normal
Tags: patch

Symptom:
usb.agent complains "missing kernel or user mode driver" whenever trying to setup an already loaded module.

Cause:
The load_drivers function tests to see if the target module is already loaded via a lsmod | grep. Unfortunately the grep always fails, it does not appear to like not having anywhere to write to
("grep: writing output: Bad file descriptor").

Solution:
redirect grep's stdout/err:

hotplug.functions Thu May 2 10:54:23 2002 renamed from hotplug.functions.orig Thu May 2 11:22:40 2002 +1 -1
@@ -135,7 +135,7 @@
     # either kernel or user mode drivers may need to be set up
     for MODULE in $DRIVERS
     do
-       if ! lsmod | grep -q "^$MODULE "; then
+       if ! lsmod | grep -q "^$MODULE " >/dev/null 2>&1; then
            if grep -q "^$MODULE\$" /etc/hotplug/blacklist \
                    >/dev/null 2>&1; then
                debug_mesg "... blacklisted module:  $MODULE"

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux shaun 2.4.17 #1 Wed May 1 12:18:30 EST 2002 i686
Locale: LANG=en_AU, LC_CTYPE=en_AU

Versions of packages hotplug depends on:

ii  debconf                       1.0.32     Debian configuration management sy
ii  modutils                      2.4.15-1   Linux module utilities.
#1 lore raw
Quoted 4 lines · Fumitoshi UKAI

Hi,

I received the attached report. I think this patch seems to be ok. May I apply this patch to cvs repository?

Looks good to me. Feel free to.

thanks,

greg k-h

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [email protected]
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel