Skip to contentSkip to conversation

/proc/bus/usb not mounted (fix)

DISCUSSION Adrian Mariano 2 participants 2 messages Jan 21, 2002 – Jan 22, 2002

lore
Share & tools
lore
#0 lore raw

First. I'm not on this list. I looked long and hard to find a place to report bugs in hotplugging and this was the only address I could find.

My problem was that /proc/bus/usb wasn't being mounted. I examined the scripts and identified the problem in /etc/hotplug/usb.rc. The following code appears:

if [ ! -f /proc/bus/usb/devices ]; then
if grep -q "[ ]/proc/bus/usb[ ]" /etc/fstab ; then
mount /proc/bus/usb
else
mount -t usbdevfs usbdevfs /proc/bus/usb
fi
fi

I had a COMMENTED OUT entry for /proc/bus/usb in my /etc/fstab which caused the erronous selection of "mount /proc/bus/usb" as the command to mount. Perhaps something like

if grep -q "^[^#]*[ ]/proc/bus/usb[ ]" /etc/fstab ; then

would fix it, but I didn't think long and hard about this or test it (I just changed my fstab once I knew what was going on).

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 5 lines · Adrian Mariano

Perhaps something like

   if grep -q "^[^#]*[        ]/proc/bus/usb[         ]" /etc/fstab ; then

would fix it

I think

grep -q "^[^#]*.*[:space:]*/proc/bus/usb[:space:]*" /etc/fstab

would be even better... does anyone know how much [:space:] is portable?

Signature · 12 lines
Gioele Barabucci (Gb])
) mailto:[email protected]
) http://www.gioelebarabucci.com
) ) I've been and now I've gone
) )          /Magic Pie^Oasis



_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel