From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Date: Sun, 08 Jun 2003 18:55:43 +0000 Subject: Re: grep /proc/bus/usb /etc/fstab in etc/hotplug/usb.rc Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Mon, Jun 09, Fumitoshi UKAI wrote: > At Sun, 8 Jun 2003 10:32:51 +0200, > Olaf Hering wrote: > > > > Hi, > > > > what is the purpose of this hunk? > > > > @@ -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% > > > > 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 -- 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 Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel