Date: Mon, 31 Jul 2000 11:42:31 +0200 (CEST) From: Alexander Leidinger <Alexander@Leidinger.net> To: pirol9999@gmx.net Cc: freebsd-isdn@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG Subject: Re: Where to put a command? Message-ID: <200007310942.LAA01248@Magelan.Leidinger.net> In-Reply-To: <20000731011642.8FD6137B8C8@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 = <interface> # $3 = -f # $4 = <up/down> # $5 = -a # $6 = <IP-Address> 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-isdn" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007310942.LAA01248>