[shr-u] Executing commands on USB insertion/removal?

Olivier Migeot larrycow at gmail.com
Tue Aug 18 16:09:24 CEST 2009


Hi,

I'm trying to execute some commands [1] whenever USB network gets up
or down. From /etc/network/interfaces, there are some lines that seem
to play that role (those starting with "up" or "down"). But it looks
like unplugging the cable doesn't change anything : for instance the
default route went on with usb0, even thought the aforementioned
interface ran out of business minutes ago.

Is this normal? Is there another way? Who killed Pamela Rose?


Thank you.

[1] Actually something that would allow to configure/unconfigure
http_proxy and ftp_proxy accordingly, but that does not really matter.
Though I have some wrapper script that doesn't work too bad for that,
or at least would work well if I could keep it informed of usb status.

-- 
Olivier



More information about the community mailing list