Date: Tue, 17 Apr 2007 12:35:41 -0400 From: Lowell Gilbert <freebsd-questions-local@be-well.ilk.org> To: Ido Admon <rhingael@mscc.huji.ac.il> Cc: freebsd-questions@freebsd.org Subject: Re: Execute command upon interface initialization? Message-ID: <44slazklgi.fsf@be-well.ilk.org> In-Reply-To: <20070417161636.GA29490@slackbox.xs4all.nl> (Roland Smith's message of "Tue\, 17 Apr 2007 18\:16\:36 %2B0200") References: <20070417145352.M39800@mscc.huji.ac.il> <20070417161636.GA29490@slackbox.xs4all.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
Roland Smith <rsmith@xs4all.nl> writes: > On Tue, Apr 17, 2007 at 06:02:25PM +0300, Ido Admon wrote: >> Hello list, >> I couldn't find any way to execute an arbitrary command upon network >> interface initialization. My situations is that I have and ethernet card >> that takes DHCP from a cables provider (not a fixed IP address) and I >> need to update a DynDNS hostname everytime it does (everytime the IP >> changes). >> I couldn't find a way to execute shell commands using the rc system or >> dhclient, what did I miss? > > dhclient-script(8)? Maybe devd(8) will work as well. devd won't work as well, because the timing is a bit off (even if you only get new addresses at boot time, which isn't guaranteed. dhclient-script already has a capability ("hooks") for running scripts at the appropriate times. If you check the mailing list archive, I know I have previously posted the script I used to use for exactly the same purpose.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44slazklgi.fsf>