From owner-freebsd-questions Tue Dec 12 18:15:16 2000 From owner-freebsd-questions@FreeBSD.ORG Tue Dec 12 18:15:15 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from cae88-102-101.sc.rr.com (unknown [24.88.102.101]) by hub.freebsd.org (Postfix) with ESMTP id A08E337B400 for ; Tue, 12 Dec 2000 18:15:13 -0800 (PST) Received: (from dmaddox@localhost) by cae88-102-101.sc.rr.com (8.11.1/8.11.1) id eBD2FDu11809; Tue, 12 Dec 2000 21:15:13 -0500 (EST) (envelope-from dmaddox) Date: Tue, 12 Dec 2000 21:15:13 -0500 From: "Donald J . Maddox" To: Mike Gruver Cc: freebsd-questions@FreeBSD.ORG, brownicm@prokyon.com Subject: Re: How to use simple firewall with DHCP? Message-ID: <20001212211513.A11793@cae88-102-101.sc.rr.com> Reply-To: dmaddox@sc.rr.com Mail-Followup-To: Mike Gruver , freebsd-questions@FreeBSD.ORG, brownicm@prokyon.com References: <001301c064a8$1eb2ede0$0200a8c0@digitalavalanche.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <001301c064a8$1eb2ede0$0200a8c0@digitalavalanche.com>; from mgruver@carolina.rr.com on Tue, Dec 12, 2000 at 08:57:57PM -0500 Return-Receipt-To: dmaddox@sc.rr.com Sender: dmaddox@cae88-102-101.sc.rr.com Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG You can create an /etc/dhclient-exit-hooks script that will enable you to do this... All of the parameters that you mention are passed to dhclient-script by dhclient, so they will be available to you in a dhclient-exit-hooks script. 'man dhclient-script' for more details, and also look at /sbin/dhclient-script. HTH On Tue, Dec 12, 2000 at 08:57:57PM -0500, Mike Gruver wrote: > > I did as much research as I could on dhclient and there did not appear to be > a query form of the command to return the network, ip, or subnet mask. > These are the precise values I need for the rc.firewall. > > It looks like the values in dhclient.leases are encapsulated in brackets {} > and the modifier "lease". > > As you might guess, I am not a big shell script afficianado. Any ideas? > > Thanks, > > Mike Gruver > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message