[OLPC-AU] magic update usbkey

Sridhar Dhanapalan sridhar at laptop.org.au
Thu Feb 10 01:09:19 EST 2011


On 10 February 2011 15:56, Martin Langhoff <martin.langhoff at gmail.com> wrote:
> 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 :-)

We're also using a olpc.fth file to make some other things easier for
teachers. Since our XOs are developer unlocked, there's nothing
stopping someone from editing it to brick the XO!

Just a bit worse than Windows autorun :(

Sridhar


More information about the OLPC-AU mailing list