Skip to contentSkip to conversation

grep /proc/bus/usb /etc/fstab in etc/hotplug/usb.rc

DISCUSSION Olaf Hering 2 participants 2 messages Jun 8, 2003 – Jun 11, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 18 lines · Fumitoshi UKAI

At Sun, 8 Jun 2003 10:32:51 +0200,

Quoted 16 lines · Olaf Hering

Hi,

what is the purpose of this hunk?

(quoted diff) +1 -1
@@ -135,7 +139,7 @@
     if [ -d /proc/bus/usb ]; then
        # if it's not mounted, try to mount it
        if [ ! -f /proc/bus/usb/devices ]; then
-           if grep -q "[        ]/proc/bus/usb[         ]" /etc/fstab ; then
+           if grep -v '^#' /etc/fstab | grep -q "[      ]/proc/bus/usb[         ]"; then
                mount /proc/bus/usb
            else
                # NOTE: name is changing to "usbfs" from "usbdevfs"

ftp.debian.org/debian/pool/main/h/hotplug/hotplug_0.0.20030117-7.diff.gz lines 729-783/891 87%

Quoted 7 lines
Quoted 4 lines

It means, if the user has disabled usbfs in fstab, it will be mounted anyway? disabling it in fstab is an effective way to disable usb hotplug processing.
Is this 'mounting it anyway' intentionally?

This is done to fix Bug#146783
Should I revert this?

I'm not sure, the question is what is supposed to happen.
if the user has it disabled, then he probably wants it disabled, even if usb hotplug would not work. In this case the mount should be a mount /proc/bus/usb &>/dev/null to avoid the error message. If we want to have it mounted anyway, this could work:
grep '^[^#].*[ ]/proc/bus/usb[ ]'
fstab could contain options for usbfs.

what do others think?

Gruss Olaf

Signature · 11 lines
USB is for mice, FireWire is for men!


-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
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 4 lines · Olaf Hering
Quoted 2 lines · Fumitoshi UKAI

This is done to fix Bug#146783
Should I revert this?

You mean, from the Debian sources, yes?

Quoted 4 lines

I'm not sure, the question is what is supposed to happen.
if the user has it disabled, then he probably wants it disabled, even if usb hotplug would not work. In this case the mount should be a

USB hotplug works *just fine* without usbfs enabled.

What won't work is user mode drivers (they need usbfs), or devices connected at boot time whose setup agents can't do their work while the system isn't fully booted.

- Dave

-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel