[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-hotplug
Subject: Exectuing a script from the rules file
From: <shankoo77 () yahoo ! com>
Date: 2007-12-11 13:26:26
Message-ID: 152479.76948.qm () web51606 ! mail ! re2 ! yahoo ! com
[Download RAW message or body]
Hi,
I'm new to writing rules and have a question on
calling a shell script from the rules file. Whenever a
USB device is attached or removed I need to write the
ACTION, Vendor Id and Product Id in a text file.
1) I don't know how to pass these information to the
shell script from the rules file.
So I started with just calling a script that prints a
string in a temporary file. The following is the
script
#!/bin/sh
echo "The Vendor id is" >> /tmp/debug_out
2) When I try to run the script with "RUN" keyword it
never gets executed when I plug in a USB device. But
the kernel has detected the USB device and prints out
appropriate messages.
I created a 10-udev.rules file in the
/etc/udev/rules.d directory. The following is the rule
SUBSYSTEM=="usb", ACTION=="add", RUN="/root/2.sh"
Can some one please let me know where am I going
wrong.
Warm Regards,
Shankar
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic