udev runs multiple times my script


Ok here there is my new udev rules to automount nokia 5800 like you can see i have used a

KERNEL==”sd?”

instead of
SUBSYSTEMS==”usb”
becasue when i plug in my nokia the subsystem usb is detected 4 times.. so the udev.rules file is used 4 times…. so /tmp/test script runs 4 times😀 now with kernel filter i get only one instance,,,

ACTION=="add", KERNEL=="sd?", ATTRS{idVendor}== "0421", ATTRS{idProduct}=="0156",  NAME="%k", SYMLINK+="Nokia 5800 Linux Rulez", OWNER="peace", GROUP="disk", MODE="0777", RUN+="/bin/mkdir /mnt/Nokia_5800"
ACTION=="add", KERNEL=="sd?", ATTRS{idVendor}== "0421", ATTRS{idProduct}=="0156",SYMLINK+="Nokia 5800 Linux Rulez", RUN+="/bin/mount   -t vfat -o umask=000,utf8,sync,flush, /dev/%k /mnt/Nokia_5800"
ACTION=="add", KERNEL=="sd?", ATTRS{idVendor}== "0421", ATTRS{idProduct}=="0156",SYMLINK+="Nokia 5800 Linux Rulez", RUN+="/tmp/test"

ACTION=="remove", KERNEL=="sd?",ATTRS{idVendor}== "0421", ATTRS{idProduct}=="0156",  RUN+="/bin/umount /mnt/Nokia_5800"
ACTION=="remove", KERNEL=="sd?",ATTRS{idVendor}== "0421", ATTRS{idProduct}=="0156",  RUN+="/bin/rmdir /mnt/Nokia_5800"

One Response to udev runs multiple times my script

  1. 00vainoblog says:

    Ciao ho aperto un altro blog e sono indeciso su quale tenere adesso ho un casino😀
    Niente porterò gli articoli tutti in uno e poi ti dirò qual’è ok penso che terrò il mio primo
    http://00vaino.blogspot.com/
    Stammi bene amico mio ah, ho messo recordmydesktop su maverik seguendo le tue dritte scaricandolo da kde-apps e tutto è andato bene
    Cazzo qua fa un freddo della madonna e c’è una bora che suffia de brutto😀

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: