* Re: manually generate event, possible ?
2010-11-02 7:01 manually generate event, possible ? J. Bakshi
@ 2010-11-02 9:52 ` Andrey Borzenkov
2010-11-02 10:51 ` Andrey Borzenkov
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Andrey Borzenkov @ 2010-11-02 9:52 UTC (permalink / raw)
To: linux-hotplug
On Tue, Nov 2, 2010 at 9:49 AM, J. Bakshi <j.bakshi@unlimitedmail.org> wrote:
> Hello list,
>
> To check the udev rules, say for a pendrive or mouse, we have to manually plug/unplug the devices every time, just after a modification in the rule sets. is there any way to generate the event for a *particular device* from command line ?
>
See "udevadm trigger".
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: manually generate event, possible ?
2010-11-02 7:01 manually generate event, possible ? J. Bakshi
2010-11-02 9:52 ` Andrey Borzenkov
@ 2010-11-02 10:51 ` Andrey Borzenkov
2010-11-02 10:55 ` J. Bakshi
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Andrey Borzenkov @ 2010-11-02 10:51 UTC (permalink / raw)
To: linux-hotplug
On Tue, Nov 2, 2010 at 1:43 PM, J. Bakshi <j.bakshi@unlimitedmail.org> wrote:
> On Tue, 2 Nov 2010 12:52:10 +0300
> Andrey Borzenkov <arvidjaar@gmail.com> wrote:
>
>> On Tue, Nov 2, 2010 at 9:49 AM, J. Bakshi <j.bakshi@unlimitedmail.org> wrote:
>> > Hello list,
>> >
>> > To check the udev rules, say for a pendrive or mouse, we have to manually plug/unplug the devices every time, just after a modification in the rule sets. is there any way to generate the event for a *particular device* from command line ?
>> >
>>
>> See "udevadm trigger".
>>
>
> Thanks , but I have already tried with ( for usb mouse )
>
> ````````````
> udevadm trigger --verbose --sysname-match=/sys/class/input/input11 actiond
> ``````````````
>
> but no luck :-(
>
This is event for input subsystem device input11, not for USB mouse.
You probably want to use real device name (under /devices) for it.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: manually generate event, possible ?
2010-11-02 7:01 manually generate event, possible ? J. Bakshi
2010-11-02 9:52 ` Andrey Borzenkov
2010-11-02 10:51 ` Andrey Borzenkov
@ 2010-11-02 10:55 ` J. Bakshi
2010-11-02 11:34 ` J. Bakshi
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: J. Bakshi @ 2010-11-02 10:55 UTC (permalink / raw)
To: linux-hotplug
On Tue, 2 Nov 2010 12:52:10 +0300
Andrey Borzenkov <arvidjaar@gmail.com> wrote:
> On Tue, Nov 2, 2010 at 9:49 AM, J. Bakshi <j.bakshi@unlimitedmail.org> wrote:
> > Hello list,
> >
> > To check the udev rules, say for a pendrive or mouse, we have to manually plug/unplug the devices every time, just after a modification in the rule sets. is there any way to generate the event for a *particular device* from command line ?
> >
>
> See "udevadm trigger".
>
Thanks , but I have already tried with ( for usb mouse )
````````````
udevadm trigger --verbose --sysname-match=/sys/class/input/input11 actiond
``````````````
but no luck :-(
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: manually generate event, possible ?
2010-11-02 7:01 manually generate event, possible ? J. Bakshi
` (2 preceding siblings ...)
2010-11-02 10:55 ` J. Bakshi
@ 2010-11-02 11:34 ` J. Bakshi
2010-11-02 13:20 ` Martin Pitt
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: J. Bakshi @ 2010-11-02 11:34 UTC (permalink / raw)
To: linux-hotplug
On Tue, 2 Nov 2010 13:51:25 +0300
Andrey Borzenkov <arvidjaar@gmail.com> wrote:
> On Tue, Nov 2, 2010 at 1:43 PM, J. Bakshi <j.bakshi@unlimitedmail.org> wrote:
> > On Tue, 2 Nov 2010 12:52:10 +0300
> > Andrey Borzenkov <arvidjaar@gmail.com> wrote:
> >
> >> On Tue, Nov 2, 2010 at 9:49 AM, J. Bakshi <j.bakshi@unlimitedmail.org> wrote:
> >> > Hello list,
> >> >
> >> > To check the udev rules, say for a pendrive or mouse, we have to manually plug/unplug the devices every time, just after a modification in the rule sets. is there any way to generate the event for a *particular device* from command line ?
> >> >
> >>
> >> See "udevadm trigger".
> >>
> >
> > Thanks , but I have already tried with ( for usb mouse )
> >
> > ````````````
> > udevadm trigger --verbose  --sysname-match=/sys/class/input/input11  actiond
> > ``````````````
> >
> > but no luck :-(
> >
>
> This is event for input subsystem device input11, not for USB mouse.
> You probably want to use real device name (under /devices) for it.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Ok, I am trying with a pendrive now. It is detected as below
``````````````````````
Nov 2 16:49:32 debian kernel: [69795.593055] sd 48:0:0:0: [sdc] Write Protect is off
Nov 2 16:49:32 debian kernel: [69795.596322] sdc: sdc1 sdc2
Nov 2 16:49:32 debian kernel: [69795.606536] sd 48:0:0:0: [sdc] Attached SCSI removable disk
```````````````````````````````````
The udev rules already has a notify-send which has shown on Desktop. Now I am trying to generate an event
`````````````````````````
udevadm trigger --verbose /dev/sdc
`````````````````````````
But no success... Any clue please ?
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: manually generate event, possible ?
2010-11-02 7:01 manually generate event, possible ? J. Bakshi
` (3 preceding siblings ...)
2010-11-02 11:34 ` J. Bakshi
@ 2010-11-02 13:20 ` Martin Pitt
2010-11-02 13:21 ` Martin Pitt
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Martin Pitt @ 2010-11-02 13:20 UTC (permalink / raw)
To: linux-hotplug
Hello,
J. Bakshi [2010-11-02 16:13 +0530]:
> udevadm trigger --verbose --sysname-match=/sys/class/input/input11 actiond
Try --sysname-match=input11. Also, it's "--action", not "action".
Also, you really don't want "add", use "change" (which is the default
now).
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: manually generate event, possible ?
2010-11-02 7:01 manually generate event, possible ? J. Bakshi
` (4 preceding siblings ...)
2010-11-02 13:20 ` Martin Pitt
@ 2010-11-02 13:21 ` Martin Pitt
2010-11-02 15:47 ` J. Bakshi
2010-11-03 17:47 ` J. Bakshi
7 siblings, 0 replies; 9+ messages in thread
From: Martin Pitt @ 2010-11-02 13:21 UTC (permalink / raw)
To: linux-hotplug
J. Bakshi [2010-11-02 16:52 +0530]:
> udevadm trigger --verbose /dev/sdc
trigger doesn't take non-option arguments. Use --sysname-match=sdc.
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: manually generate event, possible ?
2010-11-02 7:01 manually generate event, possible ? J. Bakshi
` (5 preceding siblings ...)
2010-11-02 13:21 ` Martin Pitt
@ 2010-11-02 15:47 ` J. Bakshi
2010-11-03 17:47 ` J. Bakshi
7 siblings, 0 replies; 9+ messages in thread
From: J. Bakshi @ 2010-11-02 15:47 UTC (permalink / raw)
To: linux-hotplug
On Tue, 2 Nov 2010 09:21:43 -0400
Martin Pitt <martin.pitt@ubuntu.com> wrote:
> J. Bakshi [2010-11-02 16:52 +0530]:
> > udevadm trigger --verbose /dev/sdc
>
> trigger doesn't take non-option arguments. Use --sysname-match=sdc.
>
> Martin
Hello Martin,
Thank for your kind suggestion. This time I get some success at-least. I have get the following
`````````````````````
udevadm trigger --verbose --action=remove --sysname-match=sdc
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/host9/target9:0:0/9:0:0:0/block/sdc
`````````````````````````
But the udev-rules are not called. I have send-notify in both add and remove event. Though If I unplug it physically, the rules are fired successfully. --action=change has no effect too.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: manually generate event, possible ?
2010-11-02 7:01 manually generate event, possible ? J. Bakshi
` (6 preceding siblings ...)
2010-11-02 15:47 ` J. Bakshi
@ 2010-11-03 17:47 ` J. Bakshi
7 siblings, 0 replies; 9+ messages in thread
From: J. Bakshi @ 2010-11-03 17:47 UTC (permalink / raw)
To: linux-hotplug
On Tue, 2 Nov 2010 21:05:14 +0530
"J. Bakshi" <j.bakshi@unlimitedmail.org> wrote:
> On Tue, 2 Nov 2010 09:21:43 -0400
> Martin Pitt <martin.pitt@ubuntu.com> wrote:
>
> > J. Bakshi [2010-11-02 16:52 +0530]:
> > > udevadm trigger --verbose /dev/sdc
> >
> > trigger doesn't take non-option arguments. Use --sysname-match=sdc.
> >
> > Martin
>
> Hello Martin,
>
> Thank for your kind suggestion. This time I get some success at-least. I have get the following
>
> `````````````````````
> udevadm trigger --verbose --action=remove --sysname-match=sdc
> /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/host9/target9:0:0/9:0:0:0/block/sdc
> `````````````````````````
>
> But the udev-rules are not called. I have send-notify in both add and remove event. Though If I unplug it physically, the rules are fired successfully. --action=change has no effect too.
Any other alternative please ??
Thanks
^ permalink raw reply [flat|nested] 9+ messages in thread