From owner-freebsd-questions Mon Jul 31 2:43:46 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mout1.freenet.de (mout1.freenet.de [194.97.50.132]) by hub.freebsd.org (Postfix) with ESMTP id 0F59837B8CC; Mon, 31 Jul 2000 02:43:39 -0700 (PDT) (envelope-from netchild@leidinger.net) Received: from [194.97.50.144] (helo=mx1.freenet.de) by mout1.freenet.de with esmtp (Exim 3.16 #1) id 13JC6f-0004rp-00; Mon, 31 Jul 2000 11:43:33 +0200 Received: from a3188.pppool.de ([213.6.49.136] helo=Magelan.Leidinger.net) by mx1.freenet.de with esmtp (Exim 3.16 #1) id 13JC6e-0001bq-00; Mon, 31 Jul 2000 11:43:33 +0200 Received: from Leidinger.net (netchild@localhost [127.0.0.1]) by Magelan.Leidinger.net (8.9.3/8.9.3) with ESMTP id LAA01248; Mon, 31 Jul 2000 11:42:32 +0200 (CEST) (envelope-from netchild@Leidinger.net) Message-Id: <200007310942.LAA01248@Magelan.Leidinger.net> Date: Mon, 31 Jul 2000 11:42:31 +0200 (CEST) From: Alexander Leidinger Subject: Re: Where to put a command? To: pirol9999@gmx.net Cc: freebsd-isdn@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG In-Reply-To: <20000731011642.8FD6137B8C8@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 31 Jul, Jens Sauer wrote: > can anybody tell me, where to put a command, > that shall be executed every time my ISDN-Card > dials out again ("on demand" - and gets a new IP-address). > I have to refresh my firewall-rules at every > change of the outside-ip-address > > Is "isdnd.rc" the right one ( /etc/rc is only executed > at boot-time, right?) In isdnd.rc you have to add: ---snip--- connectprog = "your_prog_or_shell_script" ---snip--- (there's also a "disconnectprog") to your dial on demand entry. After that you can put everything you want into /etc/isdn/your_prog_or_shell_script, e.g.: ---snip--- #!/bin/sh # $1 = -d # $2 = # $3 = -f # $4 = # $5 = -a # $6 = if [ "X$1" != "X-d" -o "X$3" != "X-f" -o "X$5" != "X-a" -o "X$6" = "X" ]; then # I'm awaiting the correct commandline! logger -t ISDN connectprog called without correct commandline! exit 1 fi if [ "X$4" != "Xup" ]; then # what shall I do? logger -t ISDN connectprog called with param4 = $4 exit 1 fi # do your stuff here ---snip--- Bye, Alexander. -- I believe the technical term is "Oops!" http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = 7423 F3E6 3A7E B334 A9CC B10A 1F5F 130A A638 6E7E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message