From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: add/remove actions for usb devices
Date: Sun, 28 Mar 2004 18:19:44 +0000 [thread overview]
Message-ID: <20040328181944.GA5810@vrfy.org> (raw)
In-Reply-To: <40648838.2040703@labri.fr>
On Sun, Mar 28, 2004 at 08:02:47PM +0200, Florian Iragne wrote:
>
>
> Kay Sievers wrote:
>
> >On Sun, Mar 28, 2004 at 03:45:48PM +0200, Florian Iragne wrote:
> >
> >
> >>ok, i've played a bit with this, but can't have anything working. I've
> >>created /etc/dev/block directory and put a script called xdrive.dev in
> >>this directory.
> >>it contains only a echo "something happens" > /var/log/udevEvent
> >>
> >>nothing in /var/log/udevEvent
> >>
> >>i've tried to call the script sda1.dev or anything with lower/upper
> >>cases, nothing worked. So, would it be possible to have a little example?
> >>
> >>
> >
> >Is it executable?
> >Is the first line '#!/bin/sh'?
> >
> >Please build udev with 'make DEBUG=true' and have a look at the output in
> >syslog. You should get something like this:
> >
> > Mar 28 04:15:06 pim udev[8972]: call_foreach_file: unable to open
> > '/etc/dev.d/net'
> > Mar 28 04:15:06 pim udev[8972]: call_foreach_file: open directory
> > '/etc/dev.d/default'
> > Mar 28 04:15:06 pim udev[8972]: call_foreach_file: put file
> > '/etc/dev.d/default/0.dev' in list
> > Mar 28 04:15:06 pim udev[8972]: run_program: running
> > /etc/dev.d/default/0.dev
> > Mar 28 04:15:06 pim logger: /etc/dev.d/default/0.dev /class/net/blind0
> >
> >thanks,
> >Kay
> >
> >
>
> maybe i'm wrong, but I understand when Greg told me about this .dev
> scripts that their name define their framework (e.g. : sda1.dev works
> only for event on /dev/sda1) and i don't observe this behaviour
> (actually, all scripts in /et/dev.d/block are called on udev event).
>
> so what is the normal behaviour and is there a way (other than scripting
> to parse device names or other hack)/ a naming scheme to attribute an
> event to only one device (e.g. : sda1.dev do its job only for
> create/destroy of /dev/sda1)?
/etc/dev.d/sda1/name.dev should work.
This is what actual happens for /dev/hda:
Mar 28 19:44:37 pim udev[9323]: dev_d_send: DEVNAME='/udev/hda'
Mar 28 19:44:37 pim udev[9323]: call_foreach_file: open directory '/etc/dev.d/hda'
Mar 28 19:44:37 pim udev[9323]: call_foreach_file: unable to open '/etc/dev.d/hda'
Mar 28 19:44:37 pim udev[9323]: call_foreach_file: open directory '/etc/dev.d/block'
Mar 28 19:44:37 pim udev[9323]: call_foreach_file: unable to open '/etc/dev.d/block'
Mar 28 19:44:37 pim udev[9323]: call_foreach_file: open directory '/etc/dev.d/default'
Mar 28 19:44:37 pim udev[9323]: call_foreach_file: put file '/etc/dev.d/default/1.dev' in list
Kay
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
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:[~2004-03-28 18:19 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-26 19:44 add/remove actions for usb devices Florian Iragne
2004-03-26 19:51 ` Greg KH
2004-03-26 21:13 ` Florian Iragne
2004-03-26 21:22 ` Florian Iragne
2004-03-26 22:59 ` Greg KH
2004-03-28 12:05 ` Florian Iragne
2004-03-28 13:45 ` Florian Iragne
2004-03-28 13:52 ` Kay Sievers
2004-03-28 14:08 ` Martin Lohmeier
2004-03-28 14:35 ` jjluza
2004-03-28 14:58 ` Kay Sievers
2004-03-28 16:16 ` jjluza
2004-03-28 18:02 ` Florian Iragne
2004-03-28 18:19 ` Kay Sievers [this message]
2004-03-29 16:21 ` Florian Iragne
2004-03-29 16:36 ` Florian Iragne
2004-03-29 18:51 ` Patrick Mansfield
2004-03-29 19:11 ` Martin Lohmeier
2004-03-29 23:26 ` jjluza
2004-03-30 7:22 ` Florian Iragne
2004-03-30 7:25 ` Florian Iragne
2004-03-30 8:35 ` jjluza
2004-03-30 8:49 ` Florian Iragne
2004-03-30 9:48 ` jjluza
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=20040328181944.GA5810@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.