From owner-freebsd-isdn Sun Jun 14 17:30:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA05357 for freebsd-isdn-outgoing; Sun, 14 Jun 1998 17:30:23 -0700 (PDT) (envelope-from owner-freebsd-isdn@FreeBSD.ORG) Received: from colin.muc.de (root@colin.muc.de [193.174.4.1]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id RAA05342 for ; Sun, 14 Jun 1998 17:30:10 -0700 (PDT) (envelope-from jhs@jhs.muc.de) Received: from jhs.muc.de ([193.174.4.84]) by colin.muc.de with SMTP id <140582-1>; Mon, 15 Jun 1998 01:03:08 +0200 Received: (from jhs@localhost) by jhs.muc.de (8.8.8/8.8.7) id AAA01203; Mon, 15 Jun 1998 00:39:41 +0200 (MET DST) (envelope-from jhs) Date: Mon, 15 Jun 1998 00:39:41 +0200 Message-Id: <199806142239.AAA01203@jhs.muc.de> To: "Hellmuth Michaelis" cc: freebsd-isdn@FreeBSD.ORG Subject: i4b-00.62-alpha-120698/src/i4b/isdnd/rc_scan.l.diff From: Julian Stacey Reply-To: Julian Stacey X-Net: jhs@freebsd.org jhs@muc.de www.freebsd.org/~jhs/ www.muc.de/~jhs/ X-Tel: Phone: +49.89.268616 Fax: 2608126 Data: 26023276 Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi Hellmuth, cc list Ref your README .. support incoming-only ... I was delighted to see this had been added, but to avoid /var/log/isdnd.log0:14.06.98 23:22:59 \ ERR configuration error: syntax error at line 247, token "direction" *** i4b-00.62-alpha-120698/src/i4b/isdnd/rc_scan.l Mon May 4 11:21:28 1998 --- new/src/i4b/isdnd/rc_scan.l Sun Jun 14 23:34:56 1998 *************** *** 104,109 **** --- 104,110 ---- dialout-type { return DIALOUTTYPE; } dialrandincr { return DIALRANDINCR; } dialretries { return DIALRETRIES; } + direction { return DIRECTION; } downtries { return DOWNTRIES; } downtime { return DOWNTIME; } earlyhangup { return EARLYHANGUP; } I also wrote this below, as a temporary horrible cludge ;-) --- #!/bin/sh # ISDN direction script by Julian Stacey # Linked names as isdn_in isdn_out isdn_inout # This script changes the config of all interfaces to one of in only, # out only, or both. After use, tell isdnd to reread the config file. # # I will leave isdnd running 24/7 (to report audio phone numbers etc, # as I have no isdn phone with lcd display), but I don't want to trust # my named & mailer etc configs not to dial out & run up a bill. # So this alternates all interfaces between incoming only, most of the time, # & inout the minority of the time. # It'd be nicer to have a global isdnd interactive menu Comand (5) # to integrate this global on/off, but for now this works OK. cd /etc/isdn || exit 1 case `basename $0` in isdn_inout) to=inout ;; isdn_in) to=in ;; isdn_out) to=out ;; *) echo "Invalid name calling $0" exit 1 ;; esac dir="direction = " # Cludge! Tabs & space above must Exactly match your isdnd.rc file ! # Ensure we do not expand to inoutout etc by using 4 * sed. sed -e s/"${dir}inout"/"${dir}xxx"/ < isdnd.rc | \ sed -e s/"${dir}in"/"${dir}xxx"/ | \ sed -e s/"${dir}out"/"${dir}xxx"/ | \ sed -e s/"${dir}xxx"/"${dir}$to"/ > isdnd.rc.sed_tmp if [ -s isdnd.rc.sed_tmp ]; then # -s to avoid zapping with a zero size file. cat isdnd.rc.sed_tmp > isdnd.rc # not mv in case of a symbolic link. fi echo "Please tell isdnd to re-read config file, that now uses" echo "`grep \"${dir}\" isdnd.rc | head -1`" --- Julian Julian H. Stacey http://www.freebsd.org/~jhs/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message