LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Bash script to start another script when USB is inserted? (https://www.linuxquestions.org/questions/linux-newbie-8/bash-script-to-start-another-script-when-usb-is-inserted-719532/)

linus72 04-16-2009 04:55 AM

Bash script to start another script when USB is inserted?
 
Since "autorun" seems to be only made for Windows users, I was wondering how to make a script that invokes a script on my USB?
Basically-I insert my USB-which invokes the script and starts the other script.
Example-
I have DSL/Qemu on my USB-I want the qemu script to "autostart" when I insert the USB.
So how do I make a script that autostarts Qemu from USB??
Oh-also-both scripts need to be on my USB-so I can just insert the usb inot almost any PC and Qemu starts
Possible?

Tinkster 04-16-2009 05:19 AM

Nope. Not trivially, anyway. Scripts that trigger on plug-n-play
events need to be known to the udev subsystem, rules for which
reside under /etc/udev/rules.d ... not on your stick (unless you've
already booted of it - in which case the question is moot).


All times are GMT -5. The time now is 01:30 AM.