From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Wed, 16 Sep 2009 13:19:55 +0000 Subject: Re: Waiting complete insertion of usb device Message-Id: <20090916131955.GB24562@kroah.com> List-Id: References: <4AAF5AC7.6050600@patatrac.info> In-Reply-To: <4AAF5AC7.6050600@patatrac.info> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Wed, Sep 16, 2009 at 09:38:56AM +0200, Anthony Viallard wrote: > Le 15/09/2009 17:28, Greg KH a =E9crit : > > On Tue, Sep 15, 2009 at 11:13:43AM +0200, Anthony Viallard wrote: > > > >> Hello list, > >> > >> I'm working on a 3G USB dongle which offer tty to communicate with him. > >> > >> I need to start a service when this dongle is plugged to my system. Th= is > >> service uses tty (there are 4 tty (diag, cmd, data and for voice). So,= i > >> need to waiting the complete insertion of the USB dongle before > >> launching it. > >> > >> For now, i'm waiting the last tty (ttyUSB3) event, sleep 1 second and > >> launch the service. But i think my solution is pretty crap. > >> > >> Is there a better way to do this ? > >> > >> (I'm working with old architecture of hotplug: /bin/hotplug script whi= ch > >> launch /etc/hotplug.d/${SUBSYSTEM}/ scripts...) > >> > > That architecture is obsolete, and is not shipped, or supported by any > > distro or developer, so you are on your own if you want to rely and use > > it. > > > > > do you mean my problem will be solved if i use udev ? It will make things easier, yes.