From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kelly Price Date: Sun, 05 Jun 2005 00:22:30 +0000 Subject: Re: Hot/Cold plug patch to fix USB Scanner/etc on boot issues Message-Id: <7ff5668305060417225d2ef502@mail.gmail.com> List-Id: References: <7ff5668305060415467897ae4@mail.gmail.com> In-Reply-To: <7ff5668305060415467897ae4@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On 6/4/05, Kelly Price wrote: > I had posted this patch on Gentoo's bugzilla, but apparently the > maintainer didn't apply it yet. This one fixes the incorrect DEVICE > path reported on USB devices plugged in before the system is booted, > and "coldplugged" -- most notibly scanners. >=20 > Gentoo's Bug entry is: > http://bugs.gentoo.org/show_bug.cgi?id=83738 --=20 Kelly "STrRedWolf" Price http://strredwolf.furrynet.com --- usb.rc-old 2005-03-01 19:48:06.000000000 -0500 +++ usb.rc 2005-02-24 20:51:14.000000000 -0500 @@ -94,7 +94,7 @@ PRODUCT=3D"$(cat $devlink/../idVendor)/$(cat $devlink/../idProduct)/$(cat $devlink/../bcdDevice)" if [ -f $devlink/../../devnum ] then - devbus=3D$( ( echo -n 000 ; cat $devlink/../../devnum ) | grep -o .= ..\$ ) + devbus=3D$( ( echo -n 000`echo $devlink| sed 's/^.*usb\([0-9]\+\)\/.*$/\1/'` ) | grep -o ...\$ ) devdev=3D$( ( echo -n 000 ; cat $devlink/../devnum ) | grep -o ...\= $ ) DEVICE=3D"/proc/bus/usb/$devbus/$devdev" else ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotp= ut a projector? How fast can you ride your desk chair down the office luge tra= ck? If you want to score the big prize, get to know the little guy. =20 Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 _______________________________________________ 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