magic update usbkey
Martin Langhoff
martin.langhoff at gmail.com
Wed Feb 9 23:56:30 EST 2011
On Wed, Feb 9, 2011 at 8:37 PM, Jerry Vonau <jvonau at shaw.ca> wrote:
> Ever want to have an action occur when you plug your usbkey in on an XO?
> With a bit of udev magic that is possible. First you need to have a
Just install usbmount, and you can just put your scripts in
/etc/usbmount/mount.d/ -- they get passed the mountpoint as an envvar
:-) We use it on the XS to great effect.
What James points out however is important. All of this runs as root.
A trickster can make a rather instructive mess.
In addition to James' example, keep in mind that the network
configuration files are actually executed as shellscripts. So
/etc/sysconfig/network-scripts/ifup-eth0 can state that IP_ADDR="`rm
-fr /`" and it will run it, expecting that the comand prints out
something to assign to the IP_ADDR variable.
Don't try it. It doesn't :-)
m
--
martin.langhoff at gmail.com
martin at laptop.org -- Software Architect - OLPC
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff
More information about the Devel
mailing list