Cameron Hutchison <li...@xdna.net> wrote:
CH> How can I write a udev rule to be run/matched when a device is
CH> unplugged?
CH> 
CH> I have a 3G modem that I wrote a rule for to run "ifup ppp0" when the
CH> modem is plugged in. I would like to have "ifdown ppp0" be automatically
CH> run when the modem is unplugged.
CH> 
CH> Without a rule to run "ifdown ppp0", the network state of ppp0 is
CH> remembered as up, so if I plug in the modem again, "ifup ppp0" then
CH> fails because it says the interface is already configured.

        when i was using a modem, i used a cronjob that checked for 
/var/run/ppp0.pid. when it's not detected, you can have it execute "ifdown 
ppp0".

lish
cr...@got.net


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to