From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: Run hotplug scripts after device node is created?
Date: Tue, 23 Aug 2005 19:25:26 +0000 [thread overview]
Message-ID: <20050823192526.GA30736@vrfy.org> (raw)
In-Reply-To: <e796392205082213456c05e1b@mail.gmail.com>
On Tue, Aug 23, 2005 at 08:25:05PM +0200, Stefan Schweizer wrote:
> On 8/22/05, Kay Sievers <kay.sievers@vrfy.org> wrote:
> > > currently the script is scanning all devices for a supported one .. is
> > > there some variable in a hotplug script to read out the device node?
> >
> > Sure. DEVNAME.
>
> thank you .. but I do not seem to be able to access DEVNAME :(
>
> Any better idea than again guessing and sleeping?
>
> relevant part of udev.conf:
>
> SUBSYSTEM="usb", ACTION="add", ENV{PRODUCT}="3f0/0517*",
> RUN+="/etc/hotplug/hplj-udev"
> SUBSYSTEM="usb", ACTION="add", ENV{PRODUCT}="3f0/1317*",
> RUN+="/etc/hotplug/hplj-udev"
> SUBSYSTEM="usb", ACTION="add", ENV{PRODUCT}="3f0/2B17*",
> RUN+="/etc/hotplug/hplj-udev"
> SUBSYSTEM="usb", KERNEL="lp*", ACTION="add", NAME="usb/%k",
> SYMLINK+="usb%k", GROUP="lp"
> #BUS="usb", KERNEL="lp[0-9]*", NAME="usb/%k", GROUP="lp"
>
> env of the script:
> SUBSYSTEM=usb
> DEVPATH=/devices/pci0000:00/0000:00:0f.5/usb2/2-2/2-2.1/2-2.1:1.0
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> ACTIONd
> MODALIAS=usb:v03F0p1317d0120dc00dsc00dp00ic07isc01ip02
> PWD=/
> UDEVD_EVENT=1
> SHLVL=1
> HOME=/
> DEVICE=/proc/bus/usb/002/017
> INTERFACE=7/1/2
> PRODUCT?0/1317/120
> TYPE=0/0/0
> PHYSDEVBUS=usb
> SEQNUM†3
> _=/bin/env
You are catching the event for the "raw" usb device here. I don't know what
device you need to upload the firmware too, but "raw" usb devices don't
have a device node in the current kernel only an interface in /proc.
You may need to catch the event for the printer interface, not sure.
Run "udevmonitor" while connecting the printer, it will show you all
events. And "udevmonitor --env" will print the whole environment, where
you can possibly see the DEVNAME.
Good luck,
Kay
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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
next prev parent reply other threads:[~2005-08-23 19:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-22 20:45 Run hotplug scripts after device node is created? Stefan Schweizer
2005-08-22 21:15 ` Kay Sievers
2005-08-22 21:23 ` Stefan Schweizer
2005-08-22 21:46 ` Marco d'Itri
2005-08-22 21:48 ` Kay Sievers
2005-08-23 5:26 ` Stefan Schweizer
2005-08-23 5:29 ` Stefan Schweizer
2005-08-23 7:54 ` Marco d'Itri
2005-08-23 11:32 ` Olivier Blin
2005-08-23 12:27 ` Marco d'Itri
2005-08-23 13:39 ` Sergey Vlasov
2005-08-23 14:10 ` Olivier Blin
2005-08-23 18:25 ` Stefan Schweizer
2005-08-23 19:25 ` Kay Sievers [this message]
2005-08-23 21:34 ` Stefan Schweizer
2005-08-23 21:52 ` Marco d'Itri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050823192526.GA30736@vrfy.org \
--to=kay.sievers@vrfy.org \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).