[mdlug] Custom udev rule for USB flash drive

Paul set.mailinglist at gmail.com
Fri Feb 5 03:25:35 EST 2016


Michael ORourke <mrorourke at earthlink.net>, on Thu  2016.02.04 said:

> My guess is udev does not care if anyone physically touched the 
> flashdrive.  All it cares is that it sees a new block device 
> (MySecureVol) that matches the idVendor, idProduct, and serial numbers, 
> so it re-launches the script.  Any ideas how to tweak this behavior so 
> that the script will fire each time the device is plugged in, but 
> exclude any /dev/mapper/MySecureVol devices?
> 
> Thanks,
> Mike
> 
	Hi;

	Well, I dont know much about the udev rules, but the script
itself can set a flag on initial plug, and just exit if that flag
is already set. eg. if /dev/mapper/MySecureVol exists...
	Even if you think you have a udev solution, it still might
make sense to have the script sanity test the state; if the conditions
the script are meant to enact have already happened, it need not act.

Paul
> 
> 
> _______________________________________________
> mdlug mailing list
> mdlug at mdlug.org
> http://mdlug.org/mailman/listinfo/mdlug


More information about the mdlug mailing list