When I plug my pendrive, script runs twice
When I start udevmonitor, I see UEVENT and UDEV with the same device inserted. How I can ignore UEVENT?
My desktop is updated twice, is not a great problem, but I don't like this.
Another problem is when I remove my scanner, the same rule doesn't work with my scanner, and runs good with pendrives. There is no problem adding my scanner, only when is removed.
And finally when I insert my pendrive it takes four seconds to activate it. It's normal or perhaps is about USB bus.
I use kernel 2.6.13 and udev 070. I send my file (catix.rules):
Thanks
I think that udev is good and will be great with more documentation and examples.
#catix.rules
# Regles per poder tenir dispositius usb situats a l'escriptori automaticament a la CATix
# Pendrive o memoria usb
ACTION="add" , KERNEL="[us][bd][a-z]*", RUN+="/etc/udev/scripts/catixusb.sh %k add"
ACTION="remove" , KERNEL="[us][bd][a-z]*", RUN+="/etc/udev/scripts/catixusb.sh %k remove"
# Escannner
ACTION="add" , SYSFS{product}="*[Ss][Cc][Aa][Nn]*" , ENV{MY_REMOVE}="/etc/udev/scripts/catixescanner.sh remove" , RUN+="/etc/udev/scripts/catixescanner.sh add" ACTION="remove" , ENV{MY_REMOVE}!="", RUN+="$env{MY_REMOVE}"
# Aixo tambe funciona i ho deixo per curios
# ACTION="add", KERNEL="[us][bd][a-z]*", ENV{MY_REMOVE}="/etc/udev/scripts/catixusb.sh %k remove", RUN+="/etc/udev/scripts/catixusb.sh %k add"
# ACTION="remove", ENV{MY_REMOVE}!="", RUN+="$env{MY_REMOVE}"
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 1 line · Toni Mirabete i Ter?s
When I start udevmonitor, I see UEVENT and UDEV with the same device inserted.
Are you sure? It's probably the usb device, and then the usb interface being created, right? Care to post your actual events?
Quoted 2 lines
Another problem is when I remove my scanner, the same rule doesn't work with my scanner, and runs good with pendrives.
Why would the same rule match both types of devices?
Quoted 4 lines
There is no problem adding my scanner, only when is removed.
And finally when I insert my pendrive it takes four seconds to activate it. It's normal or perhaps is about USB bus.
That's due to the delay in the usb-storage driver. It's a module paramater if you wish to shorten it.
thanks,
greg k-h
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 5 lines · Greg KH
Quoted 1 line · Toni Mirabete i Ter?s
When I start udevmonitor, I see UEVENT and UDEV with the same device inserted.
Are you sure? It's probably the usb device, and then the usb interface being created, right? Care to post your actual events?
Sorry, I was wrong here, the UEVENT and UDEV events are the same thing, they aren't two different events, that's just a debugging tool to show how udev is working. Thanks to Kay for pointing this out.
greg k-h
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Thanks for your help. My scripts had one error and run for usb device and usb interface, but I thought that it was cause of two events seen when I make udevmonitor (UEVENT and UDEV).
I send you the files of the scripts, maybe that they interest anybody. They serve to show icons for the pendrive and connected scanners on the users desks with X sessions on the local machine. I know KDE can make this, but I prefer make this myself because I can control names and others things.
Still there is an error on disconnecting the scanner. It does not work. It has to be an error in the file catix.rules. I will look if I can find it.
Toni Mirabete
A Dimarts, 20 de Setembre de 2005 14:55, Greg KH va escriure:
Quoted 15 lines · Greg KH
Quoted 6 lines · Toni Mirabete i Ter?s
Quoted 2 lines
When I start udevmonitor, I see UEVENT and UDEV with the same device inserted.
Are you sure? It's probably the usb device, and then the usb interface being created, right? Care to post your actual events?
Sorry, I was wrong here, the UEVENT and UDEV events are the same thing, they aren't two different events, that's just a debugging tool to show how udev is working. Thanks to Kay for pointing this out.
greg k-h
Quoted 9 lines
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
# Regles per poder tenir dispositius usb situats a l'escriptori automàticament a la CATix
# Pendrive o memòria usb
ACTION="add" , KERNEL="[us][bd][a-z]*", RUN+="/etc/udev/scripts/catixusb.sh %k add" ACTION="remove" , KERNEL="[us][bd][a-z]*", RUN+="/etc/udev/scripts/catixusb.sh %k remove"
# Escànner
ACTION="add" , SYSFS{product}=="*[Ss][Cc][Aa][Nn]*" , ENV{MY_REMOVE}="/etc/udev/scripts/catixusb.sh remove %b", RUN+="/etc/udev/scripts/catixescanner.sh add %b" ACTION="remove" , ENV{MY_REMOVE}!="", RUN+="$env{MY_REMOVE}"
#ACTION="remove" , SYSFS{product}=="*[Ss][Cc][Aa][Nn]*" , RUN+="/etc/udev/scripts/catixescanner.sh remove %b"
# Això també funciona i ho deixo per curiós
# ACTION=="add", KERNEL=="[us][bd][a-z]*", ENV{MY_REMOVE}="/etc/udev/scripts/catixusb.sh %k remove", RUN+="/etc/udev/scripts/catixusb.sh %k add" # ACTION=="remove", ENV{MY_REMOVE}!="", RUN+="$env{MY_REMOVE}"