[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

executing udev rules on _un_plug



How can I write a udev rule to be run/matched when a device is
unplugged?

I have a 3G modem that I wrote a rule for to run "ifup ppp0" when the
modem is plugged in. I would like to have "ifdown ppp0" be automatically
run when the modem is unplugged.

Without a rule to run "ifdown ppp0", the network state of ppp0 is
remembered as up, so if I plug in the modem again, "ifup ppp0" then
fails because it says the interface is already configured.


Reply to: