On Thu, Jul 12, 2012 at 03:25:07PM -0700, Chris Benesch wrote: > Maybe another option to dhclient to have it poll the interface every 2-3 > seconds to see if it has lost a link and if so, set the lease timer to be > expired, and wait for it to come back and once it does, it will acquire a > new address. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
The Operating system should generate a devd event. Something like the following in /usr/local/etc/devd.conf should do the trick, though I haven't tested the below with anything other than carp interfaces. I suspect it works just the same. ###################################################### notify 30 { match "system" "IFNET"; match "subsystem" "em0_or_whatever"; match "type" "LINK_UP"; action "/usr/local/sbin/script_to_do_something.sh up"; }; notify 30 { match "system" "IFNET"; match "subsystem" "em0_or_whatever"; match "type" "LINK_DOWN"; action "/usr/local/sbin/script_to_do_something.sh down"; }; ###################################################### ~Paul ________________________________ This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"