Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39189 - Hotplug error with usb.agent: "Too many arguments".
Summary: Hotplug error with usb.agent: "Too many arguments".
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Greg Kroah-Hartman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-23 12:34 UTC by Sean Parsons
Modified: 2004-03-29 16:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Parsons 2004-01-23 12:34:34 UTC
An issue occurs with the /etc/hotplug/usb.agent file in that it attempts to pass the error return from cat into a bash if conditional.  This occurs on line 144 of this file on at least version 20040105 of Hotplug with udev and a 2.6 kernel.

It is possible to solve this issue from the point of view of Hotplug by adding an additional check for existence around the code that causes this.  There is already a check like this done, but it causes a 2 second sleep which doesn't gain anything as the file is not created in that time or subsequently.

However, this appears to be a problem possibly stemming from udev as the file that the Hotplug script is attempting to access is in the /sys file system.
Comment 1 Jeff 2004-02-15 12:44:17 UTC
I'm having a similar problem:
cat: /sys//devices/pci0000:00/0000:00:02.1/usb2/2-3/2-3:1.2/host8/8:0:0:0/type: no such file or directory.
cat: /sys//class/usb/lp0/bNumConfigurations: no such file or directory
/etc/hotplug/usb.agent: line 144: [:too many arguments

Running 2.6.3 kernel w/udev but was having the problem with devfs also. The type file on the first error is there, not enought delay? (This is beyond my scope of knowledge). The bNumConfigurations file does not exist here-I've found it located at /sys/devices/pci0000:00/0000:00:02.1/usb2/2-3/*. Only on my printer have I found had the problem (HP-Photosmart 7960).
Comment 2 Jeff 2004-02-15 12:55:16 UTC
Some more info:

sys-apps/hotplug-20040105 :
        [  I] 20040105

root@Genbox 2-3 # emerge info
Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20040207-r0, 2.6.3
-rc2-mm1)
=================================================================
System uname: 2.6.3-rc2-mm1 i686 AMD Athlon(tm) XP 2600+
Gentoo Base System version 1.4.3.13
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59
Automake: sys-devel/automake-1.8.2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/s
hare/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://gentoo.noved.org/ http://212.219.247.10/sites/www.ibiblio.
org/gentoo/ http://212.219.247.12/sites/www.ibiblio.org/gentoo/ http://mirror.cl
arkson.edu/pub/distributions/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X acpi alsa avi berkdb cdr crypt cups dvd encode foomaticdb gdbm gif 
gpm gtk gtk2 imlib java jpeg libg++ libwww mad mikmod mmx motif mpeg ncurses nls
 oggvorbis opengl pam pdflib perl png python quicktime readline sdl slang spell 
sse ssl svga tcpd truetype usb x86 xml2 xmms xv zlib"
Comment 3 Jeff 2004-03-14 12:06:55 UTC
Everything is working fine now with the new version of hotplug.
Comment 4 ck 2004-03-17 00:16:53 UTC
which version would that be? 

i'm geting the same error. I have devfs, no udev, and hotplug-20040105. i'm running 2.6.4-rc2.

I've getting that error for as long as i can remember but my only usb device (Epson Stylus colour 760) is working fine.

??
Comment 5 Jeff 2004-03-18 15:00:08 UTC
hotplug 20040311 on a pure UDEV system. Kernel is 2.6.4-gentoo-r1. mm-sources (which I was using) has problems, stalls on shutdown.
Comment 6 Jeff 2004-03-20 07:19:30 UTC
So much for that-did a new install w/2.6 headers and nptl and I am now getting:

cat: /sys//class/usb/lp0/bNumConfigurations: no such file or directory
/etc/hotplug/usb.agent: line 144: [:too many arguments

Again... Printer works though.
Comment 7 Greg Kroah-Hartman (RETIRED) gentoo-dev 2004-03-20 11:02:09 UTC
bug is in upstream package, I'm working on it...
Comment 8 Greg Kroah-Hartman (RETIRED) gentoo-dev 2004-03-29 16:33:25 UTC
Fixed in 2004_03_29 release.