![]() |
OpenSlug.Hotplug HistoryHide minor edits - Show changes to markup January 10, 2006, at 01:34 PM
by -- Note specific to OpenSlug
Changed lines 3-6 from:
This HowTo describes how to run your own script when a device is added or removed. This is often also references as hotplugging. to:
This HowTo describes how to run your own script when a device is added or removed. This is often also referenced as hotplugging. This page relates to OpenSlug (at least 2.5). Debian also supports hotplugging in basically the same way, but this page was not written with Debian in mind. September 06, 2005, at 10:06 AM
by -- creation
Added lines 1-49:
Run software when a (USB) device is added or removed.This HowTo describes how to run your own script when a device is added or removed. This is often also references as hotplugging. Note that this has only been tested for USB. If you have info on other buses please add. If a device is inserted OpenSlug (at least 2.5) executes the program
Within While creating the script do not forget the Environment variables passed to usb.hotplugThe following environment variables are passed to usb.hotplug. These can be used in your script to decide what action to take. The environment variables were dumped after connecting my digital camera. Note that some of these environment variables (e.g. PATH and HOME) are there always and are not related to USB. I've left them all in for completeness (and because I don't know exactly which ones are from the kernel and passed through the hotplug program). (:table border=0 width=100% bgcolor=#eeeeff:) (:cell:) ACTION='add' DEVICE='/proc/bus/usb/003/017' DEVPATH='/devices/pci0000:00/0000:00:01.1/usb3/3-1/3-1:1.0' HOME='/' IFS=' ' INTERFACE='6/1/1' MODALIAS='usb:v04A9p30B1d0001dc00dsc00dp00ic06isc01ip01' OPTIND='1' PATH='/sbin:/bin:/usr/sbin:/usr/bin' PHYSDEVBUS='usb' PPID='2949' PRODUCT='4a9/30b1/1' PS1='\w \$ ' PS2='> ' PS4='+ ' PWD='/' SEQNUM='219' SUBSYSTEM='usb' TYPE='0/0/0' (:tableend:) |