Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am looking forward to automount ANY USB on plugin and running a shell script on my raspberry pi running raspbian wheezy. I have installed usbmount for automounting and I followed these steps:

3. Now is time to create your UDEV rule:

sudo nano /etc/udev/rules.d/85-my_rule.rules

4. And add the text

ACTION=="add", SUBSYSTEM=="usb_device",RUN+="usr/bin/local/script.sh"

I have created a shellscript script.sh in /usr/bin/local that currently has only an echo statement and given a+x permissions to it. However, this much doesn't work when the USB is plugged in. It gets automounted but the script doesnt run and nothing echoes on my terminal. (I am SSHing into my pi from laptop).

Any ideas where things are breaking? :)

share|improve this question
    
I suggest asking this in stackoverflow.com, or maybe not, i don't think anyone here would be able to answer such a technical question. –  Sickest Jan 25 at 18:45

1 Answer 1

up vote 0 down vote accepted

You have a typo there; it should read: RUN+="/usr/bin/local/script.sh". Other than that, it looks fine!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.