Date: Thu, 12 Jul 2012 17:30:37 -0500 From: "Paul A. Procacci" <pprocacci@datapipe.com> To: Chris Benesch <chris.benesch@gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: System doesn't detect unplugged network cable and doesn't set interface up properly with DHCP Message-ID: <20120712223037.GD1907@nat.myhome> In-Reply-To: <CAPKwmM3H2UJm1nX_2LZiHRxOswh__mF-SwVbNA7D6eBwg%2B10Ow@mail.gmail.com> References: <4FFF3683.7020107@rawbw.com> <CAPKwmM1MLm5nYX6LT480iX2R9gKAQBskUghwVj6Q8KF8oMyL=w@mail.gmail.com> <CAOjFWZ6dCDSkdxGNGzmo%2Bu871sOF8r05b6psukoP9pDLQHHk6A@mail.gmail.com> <20120712211959.GG20201@numachi.com> <CAPKwmM3H2UJm1nX_2LZiHRxOswh__mF-SwVbNA7D6eBwg%2B10Ow@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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-unsubscribe@freebsd.org" The Operating system should generate a devd event. Something like the following in /usr/local/etc/devd.conf should do the tric= k, 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 m= essage. See http://www.datapipe.com/legal/email_disclaimer/ for further inf= ormation on confidentiality and the risks of non-secure electronic communic= ation. If you cannot access these links, please notify us by reply message = and we will send the contents to you.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120712223037.GD1907>