[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: running a script on inserting a USB memory stick




On Fri, 22 Apr 2005, Mark wrote:

> I'd like my system to run a script when it sees I've inserted a USB 
> memory stick.
> Is there a daemon out there that can do that?

it already does .. automagcially ... 
	- the system knows when you plug it in and unplug it
	- you might have to turn on the usb modules and i'm not sure
	if hotplug thingies need to be on too  ( i doubt it, as i usually
	turn off hotplug anything )

> Currently every time I insert the disk, the system enters a bit of 
> info about it in syslog.

good .. it's working

> Instead of running the script automaticly from cron every ten 
> minutes, such a Daemon running it only when neccesary would be nicer 
> right?

===>> no ... usb stick is a major security breach <<===

but if you insist on it ... automount it ( autofs or amd )
	add an entry for /dev/USBxx into  autofs files

think cdrom ... everytime its inserted ... it does everything
automagically

c ya
alvin



Reply to: