From: "Toni Mirabete i Terés" <amirabet@xtec.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: When I plug my pendrive, script runs twice
Date: Wed, 21 Sep 2005 00:56:01 +0000 [thread overview]
Message-ID: <200509210302.24218.amirabet@xtec.net> (raw)
In-Reply-To: <200509200352.56616.amirabet@xtec.net>
[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]
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:
> On Tue, Sep 20, 2005 at 02:26:52AM -0700, Greg KH wrote:
> > On Tue, Sep 20, 2005 at 03:52:56AM +0200, Toni Mirabete i Ter?s wrote:
> > > 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
> Linux-hotplug-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
[-- Attachment #2: catix.rules --]
[-- Type: text/plain, Size: 903 bytes --]
# 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}"
[-- Attachment #3: catixescanner.sh --]
[-- Type: application/x-shellscript, Size: 1468 bytes --]
[-- Attachment #4: catixusb.sh --]
[-- Type: application/x-shellscript, Size: 2898 bytes --]
prev parent reply other threads:[~2005-09-21 0:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-20 1:52 When I plug my pendrive, script runs twice Toni Mirabete i Terés
2005-09-20 9:26 ` Greg KH
2005-09-20 12:55 ` Greg KH
2005-09-21 0:56 ` Toni Mirabete i Terés [this message]
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=200509210302.24218.amirabet@xtec.net \
--to=amirabet@xtec.net \
--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).