From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Sun, 28 Mar 2004 18:19:44 +0000 Subject: Re: add/remove actions for usb devices Message-Id: <20040328181944.GA5810@vrfy.org> List-Id: References: <40648838.2040703@labri.fr> In-Reply-To: <40648838.2040703@labri.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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_id70&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