From owner-freebsd-questions@FreeBSD.ORG Tue Apr 17 16:35:43 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8EAFB16A400 for ; Tue, 17 Apr 2007 16:35:43 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail6.sea5.speakeasy.net (mail6.sea5.speakeasy.net [69.17.117.8]) by mx1.freebsd.org (Postfix) with ESMTP id 6B99413C448 for ; Tue, 17 Apr 2007 16:35:43 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 6424 invoked from network); 17 Apr 2007 16:35:42 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail6.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 17 Apr 2007 16:35:42 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id A694F28439; Tue, 17 Apr 2007 12:35:41 -0400 (EDT) To: Ido Admon References: <20070417145352.M39800@mscc.huji.ac.il> <20070417161636.GA29490@slackbox.xs4all.nl> From: Lowell Gilbert Date: Tue, 17 Apr 2007 12:35:41 -0400 In-Reply-To: <20070417161636.GA29490@slackbox.xs4all.nl> (Roland Smith's message of "Tue\, 17 Apr 2007 18\:16\:36 +0200") Message-ID: <44slazklgi.fsf@be-well.ilk.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.97 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: Execute command upon interface initialization? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Apr 2007 16:35:43 -0000 Roland Smith 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.