FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 04-28-2008, 07:41 PM
Rainer Dorsch
 
Default Calling a script after USB scanner is plugged

Am Samstag, 26. April 2008 schrieb Julien BLACHE:
> Rainer Dorsch <rdorsch@web.de> wrote:
>
> Hi,
>
> > The script works now reasonably robust (for now) when I plug the USB
> > scanner. My problem is though, that the script does not get called when I
> > boot the system and the scanner is plugged already during bootup. Why is
> > this?
>
> Chances are the coldplugging happens from the initrd and your script
> isn't available in the initrd. So check that.

How would I check if coldplugging happens from the initrd?

And would that explain that /etc/init.d/udev restart no effect?

Thanks,
Rainer

--
Rainer Dorsch
Lärchenstr. 6
D-72135 Dettenhausen
07157-734133
email: rdorsch@web.de
jabber: rdorsch@jabber.org
GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F 8F59 E3A8 C538 7519 141E
Full GPG key: http://pgp.mit.edu/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-28-2008, 08:17 PM
Julien BLACHE
 
Default Calling a script after USB scanner is plugged

Rainer Dorsch <rdorsch@web.de> wrote:

Hi,

>> Chances are the coldplugging happens from the initrd and your script
>> isn't available in the initrd. So check that.
>
> How would I check if coldplugging happens from the initrd?

Well anyway it should be redone once the root FS is mounted and the
/dev/tmpfs is mounted, so it's not an issue.

> And would that explain that /etc/init.d/udev restart no effect?

Nope, that should always work, provided the effect of the udev restart
hasn't changed while I wasn't looking

JB.

--
Julien BLACHE <http://www.jblache.org>
<jb@jblache.org> GPG KeyID 0xF5D65169


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-29-2008, 06:42 PM
Tzafrir Cohen
 
Default Calling a script after USB scanner is plugged

On Wed, Apr 23, 2008 at 10:53:48PM +0200, Rainer Dorsch wrote:
> Am Mittwoch, 23. April 2008 schrieb Julien BLACHE:
> > Johannes Meixner <jsmeix@suse.de> wrote:
> >
> > Hi,
> >
> > >> umax1220u scripts are started in a sequence (i.e. not in parallel, when
> > >> one is completed the next one starts).
> >
> > When troubleshooting udev rules, use udevmonitor to actually see
> > what's happening in terms of udev events and their properties.
> >
>
> That was a very good hint, thanks. A single scanimage -L causes these events:
>
> UEVENT[1208979136.171525] remove /class/usb_endpoint/usbdev1.5_ep01
> (usb_endpoint)
> UEVENT[1208979136.171696] remove /class/usb_endpoint/usbdev1.5_ep82
> (usb_endpoint)
> UEVENT[1208979136.171702] remove /class/usb_endpoint/usbdev1.5_ep83
> (usb_endpoint)
> UEVENT[1208979136.171707] add /class/usb_endpoint/usbdev1.5_ep01
> (usb_endpoint)
> UEVENT[1208979136.171712] add /class/usb_endpoint/usbdev1.5_ep82
> (usb_endpoint)
> UEVENT[1208979136.171717] add /class/usb_endpoint/usbdev1.5_ep83
> (usb_endpoint)
> UDEV [1208979136.172276] remove /class/usb_endpoint/usbdev1.5_ep01
> (usb_endpoint)
> UDEV [1208979136.172803] remove /class/usb_endpoint/usbdev1.5_ep82
> (usb_endpoint)
> UDEV [1208979136.173239] remove /class/usb_endpoint/usbdev1.5_ep83
> (usb_endpoint)
> UDEV [1208979136.174020] add /class/usb_endpoint/usbdev1.5_ep01
> (usb_endpoint)
> UDEV [1208979136.174831] add /class/usb_endpoint/usbdev1.5_ep82
> (usb_endpoint)
> UDEV [1208979136.175619] add /class/usb_endpoint/usbdev1.5_ep83
> (usb_endpoint)

Our device's udev rules file uses:

#####################################
#####################################
BUS!="usb", ACTION!="add", GOTO="xpp_usb_add_end"
KERNEL=="*_ep*", GOTO="xpp_usb_add_end"
KERNEL=="[0-9]*", GOTO="xpp_usb_add_end"

# the actual rules go in here

LABEL="xpp_usb_add_end"
#####################################
#####################################

>
> >
> > > ACTION!="add", GOTO="end"
> > > SYSFS{idVendor}=="04b8", SYSFS{idProduct}=="010b", RUN+="..."
> > > LABEL="end"

BTW: any idea when is Debian going to move from SYSFS to ATTR ?

My Lenny box does not seem to support ATTR right now.

--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 11:03 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org