Re: [OM2008] USB events - scripts?

2008-12-12 Thread Pander
On Fri, December 12, 2008 12:35, Vasco Névoa wrote: Hi all. I want to run a script automatically every time the USB is plugged or unplugged. This is in the udev rules. See http://lists.openmoko.org/pipermail/community/2008-November/thread.html#35417 for ideas concerning keybaords and

[OM2008] USB events - scripts?

2008-12-12 Thread Vasco Névoa
Hi all. I want to run a script automatically every time the USB is plugged or unplugged. Where should I hook in the scripts? /etc/apm/?/... or somewhere else? I've looked into using the /etc/network/interfaces, but this doesn't work because usb0 does not get downed on unplug - so it is

Re: [OM2008] USB events - scripts?

2008-12-12 Thread Joel Newkirk
In my work to bring sanity to basic networking I explored this. For 2008.x the solution I ended with was udev. Two files in my netfix tarball pertain to this: #/etc/udev/rules.d/usbnet subsystem==power_supply, RUN+=/etc/udev/scripts/usbnet.sh #/etc/udev/scripts/usbnet.sh #!/bin/sh #

Re: [OM2008] USB events - scripts?

2008-12-12 Thread Joel Newkirk
On Fri, 12 Dec 2008 19:22:29 +0100, DJDAS dj...@djdas.net wrote: Joel Newkirk ha scritto: The only problem with this approach so far is that on powerup it doesn't trigger, only on USB insertion after fully booted. j Did you try forcing udev events triggering by using udev-trigger